重命名CMD中的多个文件名 [英] Rename multiple files name in CMD

查看:104
本文介绍了重命名CMD中的多个文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的每个文件都具有要替换的月份。

Every of my files have the same month which I would like to replace.

问题是月份在中间,中间是空格。看起来像这样的 apple Oct'18.xlsx

The problem is the month is in the middle and after a space. It looks something like this apple Oct'18.xlsx

基于此网站,
https://superuser.com/questions/475874/how-does-the- Windows重命名命令解释通配符

我尝试使用 ren ?????? Oct ??? * .xlsx ?????? Nov ??? *。xlsx

推荐答案

文件模式中缺少 SPACE 。您可以使用以下命令行...:

There is the SPACE missing in your file pattern. You can use the following command line...:

ren "* Oct'*.xlsx" "* Nov'*.*"

...,因为 SPACE <月名之前的/ kbd>是文件名中的最后一个。

..., given that the SPACE before the month name is the last one in the file names.

因此,使用该命令行可以显示以下文件:

Hence using that command line, the following files:


and some pears Oct'18_xyz.xlsx
apples Oct'18.xlsx
bananas Oct'18.xlsx
more fruit Oct'18_xyz.xlsx
oranges Oct'18.xlsx
plus peaches Oct'18_xyz.xlsx
strawberries Oct'18 abcdef.xlsx


...被重命名为以下名称:

...become renamed to these ones:


and some pears Nov'18_xyz.xlsx
apples Nov'18.xlsx
bananas Nov'18.xlsx
more fruit Nov'18_xyz.xlsx
oranges Nov'18.xlsx
plus peaches Nov'18_xyz.xlsx
strawberries Oct'18 Nov'ef.xlsx


如您所见,最后一个文件被错误地重命名,因为它违反了有关月份名称后面的 SPACE 的前述限制。

As you can see, the last file has been renamed wrongly, since it violates the aforementioned restriction concerning SPACEs behind the month name.

这篇关于重命名CMD中的多个文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆