- @echo off
- setlocal EnableDelayedExpansion
- cd /d "%~dp0"
- set files="2.txt" "cd.txt" "stdout.txt" "stderr.txt"
- 2>nul md user_rar
- for %%A in (%files%) do (
- set "t=%%~tA"
- set "t=!t:-=!"
- set "t=!t:/=!"
- set "t=!t::=!"
- set "t=!t: =_!"
- goto break
- )
- :break
- rar.exe a "user_rar\DSFC_DSNB_!t!.rar" %files%
- endlocal
复制代码
|