我想使用批处理脚本重命名文件。
这些文件当前命名如下:
pkg_mon_doc_kpps_01.html
pkg_mon_doc_kpps_10.html
pkg_mon_doc_kpps_02.html
我想将它们更改为:
data_1.xls
data_2.xls
data_3.xls
我制作了批处理文件,当我运行脚本时,重命名成功但出现警告
我的批处理脚本:
@echo off
set count=0
:: Getting number of files
for %%x in (folder\*.html) do (set /a count+=1)
:: Renaming files
for /l %%a in (1,1,%count%) do (ren folder\*.html data_%%a.xls)
pause
警告
A duplicate file name exists, or the file cannot be found.
A duplicate file name exists, or the file cannot be found.
A duplicate file name exists, or the file cannot be found.
Press any key to continue . . .
怎么了?谢谢之前:)