方法2- @echo off
- set YYYYmmss=%date:~0,4%.%date:~5,2%.%date:~8,2% %time:~0,2%;%time:~3,2%,%time:~6,2%
-
- REM 根据自己电脑实际情况设置 7-Zip 的路径
- set "My7z=C:\Program Files\7-Zip\7z.exe"
- cd /d "C:\Users\Administrator\AppData\Local\ConnectedDevicesPlatform"
- for /f "delims=" %%i in ('dir /b') do (
- echo 正在处理文件 %%i
- "%My7z%" a "D:\Contra Operation Galuga\%YYYYmmss%.zip" "%%i"
- )
- pause
复制代码
|