使用批处理文件,有没有一种方法可以从目录中的所有文件中去掉 .deploy 扩展名。
例如:
1.txt.deploy => 1.txt 2.txt.deploy => 2.txt
等等
RENAME *.txt.deploy *.
一种更“花哨”的解决方案:
@ECHO OFF FOR %%f IN (*.txt.deploy) DO RENAME "%%f" "%%~nf"
%~
%~
的更多详细信息。 - northern-bradley