回复 11# onging
你对比着1楼改,也不能改成这样啊 robocopy "D:\新建文件夹" "D:\新建文件夹"
- @echo off
- for /f %%a in ('wmic os get localdatetime ^| findstr [0-9]') do (
- set d=%%a
- )
- set d1=%d:~0,4%-%d:~4,2%-%d:~6,2%
- set d2=%d:~0,4%%d:~4,2%%d:~6,2%
- robocopy "d:\新建文件夹" "d:\新建文件夹\%d1%" /s /move /xd "d:\新建文件夹\%d1%" /maxage:%d2%
- pause
复制代码
|