【发布时间】:2015-11-16 16:14:18
【问题描述】:
您好,我想将文件夹中的所有文件重命名为随机名称,但它想将所有文件重命名为相同的名称
ren "c:\Test\*.txt" %Random%.txt
pause
输出:
C:\Users\Oliver\Desktop>ren "c:\Test\*.txt" 9466.txt
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.
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.
C:\Users\Oliver\Desktop>pause
Press any key to continue . . .
知道如何在批处理文件中为文件夹中的每个文件随机生成名称吗?
【问题讨论】:
标签: file batch-file random filenames file-rename