Created
October 10, 2016 09:13
-
-
Save paweloque/1ecf9ef089bdcd48643e8587b2a9eb77 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from os import listdir, rename | |
from os.path import isfile, join | |
#path = '/Volumes/HD-PATU3/Pawel/Pictures' | |
path = './' | |
for f in listdir(path): | |
if not isfile(join(path, f)): | |
spl = f.split('_') | |
#print 'File: %s' % f | |
if spl[0].__len__() == 2: | |
newf = '20%s' % f | |
print 'New File: %s' % newf | |
rename(join(path, f), join(path, newf)) | |
#for part in spl: | |
#print 'Part: %s' % part |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment