I have a directory which contains a lot of photos. But, for some reasons, the files's names do not have file extension. Something like:
Because of that, I cannot upload those photos to facebook. The file-chooser window does not recognize them as images. So, I have to add .JPEG extension for all photos. Python helps me this time (and so many other times). Run this python script inside the myphotos directory;
from os import listdir, rename
from os.path import isfile, join
return [ f for f in listdir(path) if (isfile(join(path,f)))]
for fn in files_list:
tem_fn = fn + '.JPEG'
file_list = get_files_list('.')