批量重命名文件
所以我有一系列具有以下格式的文件:它们的真实文件名后跟日期。
file_1_12DEC2011.pdf
file_2_12DEC2011.pdf
file_3_12DEC2011.pdf
file_4_12DEC2011.pdf
file_5_12DEC2011.pdf
我想弄清楚如何将这一天增加一天。例如,这将是我想要的结果。
file_1_13DEC2011.pdf
file_2_13DEC2011.pdf
file_3_13DEC2011.pdf
file_4_13DEC2011.pdf
file_5_13DEC2011.pdf
So I have a series of files with the following format Their real file name followed by the date.
file_1_12DEC2011.pdf
file_2_12DEC2011.pdf
file_3_12DEC2011.pdf
file_4_12DEC2011.pdf
file_5_12DEC2011.pdf
I am trying to figure out How I can Increment the day by one day. For instance, this would be my desired result.
file_1_13DEC2011.pdf
file_2_13DEC2011.pdf
file_3_13DEC2011.pdf
file_4_13DEC2011.pdf
file_5_13DEC2011.pdf
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了安全地执行此操作,请在
mv
之前echo
:要快速执行此操作,请使用
rename
命令:更新:
您可以使用 awk 生成新文件名,并将其放入上面的命令中。
To do it safely,
echo
beforemv
:To do it quickly, use the
rename
command:UPDATE:
You can use
awk
to generate new file name, and put it in those command above.你可以试试这个.BATch文件:
测试该文件,如果结果正常,则删除ren命令中的ECHO部分。
该文件应适用于任何名称和任何数字,只要文件名的最后 9 个字符是 DDMMMYYYY 格式的日期(如上所示)。
Yoy may try this .BATch file:
Test the file and, if the result is OK, delete the ECHO part in ren command.
This file should work with any name and any number, as long as the last 9 characters of the file name be the date in DDMMMYYYY format as shown above.