从文件名中删除无用字符

trimfilename的Python项目详细描述


Stories in Ready

从文件名中修剪特定模式的脚本。

在所述路径上递归检查文件的模式匹配 或在当前工作目录中。

用法

home $ ls songs
04_maroon5_she_will_be_loved.mp3        05 Flo Rida-Whistle.mp3
Nelly-Just A Dream 2010.mp3             David Archuleta - A Little Too Not Over You000.mp3


home $ trimfilename songs
parsing directory: songs
Files renamed:
songs/04_maroon5_she_will_be_loved.mp3    : maroon5_-_she_will_be_loved-tn.mp3
songs/05 Flo Rida-Whistle.mp3             : Flo Rida - Whistle.mp3

Successfully renamed 2 file/s


home $ ls thumbs
AlbumArt_Adele_Large.jpg  AlbumArt_hall_of_fame_Large.jpg  AlbumArt_lotavo_Large.jpg


home $ trimfilename thumbs -b AlbumArt_
parsing directory: thumbs
Files renamed:
thumbs/AlbumArt_Adele_Large.jpg        : Adele_Large.jpg
thumbs/AlbumArt_hall_of_fame_Large.jpg : hall_of_fame_Large.jpg
thumbs/AlbumArt_lotavo_Large.jpg       : lotavo_Large.jpg

Successfully renamed 3 file/s


home $ ls thumbs
Adele_Large.jpg  hall_of_fame_Large.jpg  lotavo_Large.jpg


home $ trimfilename thumbs -p _large -i
parsing directory: thumbs
Files renamed:
thumbs/lotavo_Large.jpg       : lotavo.jpg
thumbs/hall_of_fame_Large.jpg : hall_of_fame.jpg
thumbs/Adele_Large.jpg        : Adele.jpg

Successfully renamed 3 file/s

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么@DELETE REST不起作用?   带有JPA2的java表值参数。1和Hibernate,Sql Server   如何将Java类添加到Xamarin VS2017项目   绘制多边形时出现java空指针异常   java Apache WebClient 303状态未重定向   java如何用一组字符串数组从数据库中获取数据   java是否可以使用Google Drive API向文件中添加脚本?   java组织。阿帕奇。贾斯珀。JspC jar文件下载   java在整个JSON映射中将单个值作为JSON流   通过命令行将文件输入到java   java rs.next()总是返回false   java标记异常,通知调用方利用异常消息   java Spring YML数组属性为空