@ECHO OFF
SET /P parent_folder=Please specify parent directory:
SET /P destination_folder=Please specify destination:
set NOW=%date:~10,4%-%date:~4,2%-%date:~7,2%--%time:~0,2%.%time:~3,2%
FOR %%n in (%parent_folder%*.*) DO (
copy "%%n" "%destination_folder%"
set /A count+=1
)
到目前为止还没有工作。如果有人将其设为有效,我可以将日期附加到%destination_folder%
以获取我的结果。
答案 0 :(得分:0)
您可以将时间戳附加到目标文件名,如下所示:
for %%n in ("%parent_folder%\*.*") do (
copy "%%~n" "%destination_folder%\%%~nn_%NOW%%%~xn"
set /a count+=1
)