本帖最后由 foxJL 于 2013-11-2 14:53 编辑
我的代码:- @echo off 复制正在进行中.....请稍候.....
-
-
- rem 获取日期(假设系统日期格式为yyyy-mm-dd)
-
- set ThisDay=%date:~0,4%%date:~5,2%%date:~8,2%
-
-
-
- rem 获取时间
-
-
- if "%time:~0,2%" lss "10" (
- set ThisTime=0%time:~1,1%%time:~3,2%)
- else
-
- (set ThisTime=%time:~0,2%%time:~3,2%
- )
-
- set t=%ThisDay%
-
- rem 复制并重命名
-
- setlocal enabledelayedexpansion
-
- for /f "delims=*" %%i in ('dir/s/b/a-d d:\0001\') do ren "%%i" "%%~ni%t%%%~xi"
复制代码
|