Batch Renaming of Files in a Directory

前端 未结 13 1458
孤街浪徒
孤街浪徒 2020-11-27 09:41

Is there an easy way to rename a group of files already contained in a directory, using Python?

Example: I have a directory full of *.doc files an

13条回答
  •  失恋的感觉
    2020-11-27 09:56

    Try: http://www.mattweber.org/2007/03/04/python-script-renamepy/

    I like to have my music, movie, and picture files named a certain way. When I download files from the internet, they usually don’t follow my naming convention. I found myself manually renaming each file to fit my style. This got old realy fast, so I decided to write a program to do it for me.

    This program can convert the filename to all lowercase, replace strings in the filename with whatever you want, and trim any number of characters from the front or back of the filename.

    The program's source code is also available.

提交回复
热议问题