Created
December 19, 2011 14:56
-
-
Save linktoming/1497555 to your computer and use it in GitHub Desktop.
Rename Files in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
i=1 | |
for file in os.listdir("/Users/****/Downloads/Episode1"): | |
if os.path.splitext(file)[1] == ".gif": | |
os.rename(file, "2011_11_"+str(i)+".gif") | |
i+=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment