I have just written a python script to get rid of some annoying suffixes in file names,
Here is my code: But I got an error in the previous row: I'm pretty sure I have the right path because I can print all the filenames correctly. ... in fact it is not known why it can not work. Thank you for your reply You
OSError: [name] Rename the file [File name, File name [: - 18] + '. Mov 'Errno 2] Any such file or directory
os.rename (file name, file name [: - 18] + '.mov')
os .rename (root + os.sep + filename, root + os.sep + filename [: - 18] + '.mov')
No comments:
Post a Comment