所有系统上的文件和文件夹名修饰符
modfname的Python项目详细描述
modfname
所有系统上的文件和文件夹名修改器。
用文件/文件夹名称中的另一个字符串替换字符串,例如用下划线替换空格。此工具允许以直观、愉快的方式在所有文件系统上执行大规模且受控制的文件/文件夹名称修改。modfname进程可以从定义的路径递归执行,也可以直接在特定路径上执行。
安装
with pip: sudo pip3 install modfname with yay: yay -a modfname with yaourt: yaourt -a modfname
相容性
python>;=3
用法
modfname [-i] [-d] [-r] [-p] [--initial INITIAL_STRING_01 INITIAL_STRING_02 ...] [--destination DESTINATION_STRING] [--paths PATH_01 PATH_02 ...] [--recursive] [--end_param] options:-h, --help show this help message and exit -i, --initial, --init initial strings INITIAL_STRING_01 INITIAL_STRING_02 ... to be replaced -d, --destination, --dest destination string DESTINATION_STRING to replace any INITIAL_STRING_01 INITIAL_STRING_02 ...-r, --recursive, --rec modify file/folder names recursively from a defined path given by --paths PATH-p, --paths define the specific paths PATH_01 PATH_02 ... to apply the modification or the path to perform recursively the modification from -end_param, --end precise the end of a parameter enumeration
示例
对于帮助:
modfname -h or modfname --help
specific将文件/文件夹名从空格改为“test folder”文件夹和“test folder/the test”文件上的下划线:
modfname -i " " -d "_" -p "Test folder""Test folder/the test" or modfname -initial " " -destination "_" --end_param "Test folder""Test folder/the test"
recursive从“~/Téléchargements”文件夹将文件/文件夹名从“é”修改为“e”:
modfname -i "é" -d "e" -p ~/Téléchargements or modfname -i "é" -d "e" --end ~/Téléchargements
建议
modfname的一些有用bash别名:
# spaces to underscores modification on file/folder name for the specified pathsaliasmodfnamespacesto_='modfname -i " " -d "_" -p'# spaces to underscores modification on file/folder name in the local folder pathaliasmodfnamespacesto_local='modfname -i " " -d "_" -l -p'# spaces to underscores modification on file/folder name recursively from the precise folder pathaliasmodfnamespacesto_recursive='modfname -i " " -d "_" -r -p'# to lowercase on file/folder name for the specified pathsaliasmodfnamelower='modfname --lowercase -p'# to lowercase on file/folder name in the local folder pathaliasmodfnamelowerlocal='modfname --lowercase -l -p'# to lowercase on file/folder name recursively from the precisealiasmodfnamelowerrecursive='modfname --lowercase -r -p'# to uppercase on file/folder name for the specified pathsaliasmodfnameupper='modfname --uppercase -p'# to uppercase on file/folder name in the local folder pathaliasmodfnameupperlocal='modfname --uppercase -l -p'# to uppercase on file/folder name recursively from the precisealiasmodfnameupperrecursive='modfname --uppercase -r -p'