如何重命名在cmd中通配符目录 [英] How to rename a directory with wildcards in cmd
本文介绍了如何重命名在cmd中通配符目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想以下内容:
rename "*12" "12"
我得到的错误
该命令的语法不正确。
我是什么做错了,我怎么能做到这一点?
What am I doing wrong and how can I achieve this?
难道我们不能在引号中使用通配符?如果是我如何使用他们
行情?
Is it that we cannot use wildcard characters in quotes? if yes how do i use them with quotes?
推荐答案
改名
使用通配符只适用于文件,重命名目录,使用移动
;
rename
with wildcards only works on files, to rename a directory, use move
;
C:\Temp>echo "test" > olle12
C:\Temp>mkdir olle13
C:\Temp>rename "*12" 12
C:\Temp>rename "*13" 13
The syntax of the command is incorrect.
C:\Temp>move "*13" 13
C:\Temp\olle13
1 dir(s) moved.
C:\Temp>dir
Directory of C:\Temp
2013-04-03 10:01 9 12
2013-04-03 10:01 <DIR> 13
这篇关于如何重命名在cmd中通配符目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文