Home
Sign Up
Sign In
这是一个专门讨论 idea 的地方。
每个人的时间,资源是有限的,有的时候你或许能够想到很多 idea,但是由于现实的限制,却并不是所有的 idea 都能够成为现实。
那这个时候,不妨可以把那些 idea 分享出来,启发别人。
Advertisement
V2EX
›
奇思妙想
不知道大家有没有用过正则批量替换文件名的命令或者命令行工具之类的?
kily
·
Mar 18, 2015
· 4349 views
This topic created in 4248 days ago, the information mentioned may be changed or developed.
有时候有把类似 image.jpg
[email protected]
[email protected]
这些文件名重命名的这种需求。
没有的话自己写个简单的好像也不麻烦。有的话就不造轮子了。
多谢!
[email protected]
[email protected]
文件名
7 replies
•
2015-03-18 19:03:38 +08:00
hicdn
Mar 18, 2015
1
1
linux rename
rrfeng
Mar 18, 2015
2
windows ren
kily
OP
Mar 18, 2015
3
@
hicdn
多谢!
aliuwr
Mar 18, 2015
4
Linux 上能搜索到的工具都试过了, 替换表达式不支持正则.
于是自己用 Python 写了个.
https://gist.github.com/2c059f9cd0bcd88eff94.git
aliuwr
Mar 18, 2015
5
正确链接格式:
https://gist.github.com/CzBiX/2c059f9cd0bcd88eff94
imn1
Mar 18, 2015
6
@
aliuwr
莫非你用的是archlinux?不少发行版是把perl-rename作为默认rename的,用正则没问题
另外装 regex 代替 re 吧,py 的内部 re 有点问题的
lgh
Mar 18, 2015
7
不限命令行的话,Total Commander
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2892 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 38ms ·
UTC 13:19
·
PVG 21:19
·
LAX 05:19
·
JFK 08:19
♥ Do have faith in what you're doing.
❯