楼 主
按月COPY文件到不同的目录
发表于 2008-04-14 08:17 · 中国 吉林 长春 联通
新手上路
★
积分 10
发帖 3
注册 2008-01-21 16:12
18年会员
UID 109182
性别 男
状态 离线
我有一个目录里,有好多的文件,我想把它整理一下,按照月COPY到不同的目录里,该如何做?
第 2 楼
发表于 2008-05-30 15:55 · 中国 广东 电信
高级用户
★★★
积分 740
发帖 373
注册 2008-05-23 14:40
18年会员
UID 119498
性别 男
来自 中国,广东
状态 离线
:date
date/t|find "-01-" > nul
if "%ERRORLEVEL%"=="0" goto 1
date/t|find "-02-" > nul
if "%ERRORLEVEL%"=="0" goto 2
date/t|find "-03-" > nul
if "%ERRORLEVEL%"=="0" goto 3
date/t|find "-04-" > nul
if "%ERRORLEVEL%"=="0" goto 4
date/t|find "-05-" > nul
if "%ERRORLEVEL%"=="0" goto 5
date/t|find "-06-" > nul
if "%ERRORLEVEL%"=="0" goto 6
date/t|find "-07-" > nul
if "%ERRORLEVEL%"=="0" goto 7
date/t|find "-08-" > nul
if "%ERRORLEVEL%"=="0" goto 8
date/t|find "-09-" > nul
if "%ERRORLEVEL%"=="0" goto 9
date/t|find "-10-" > nul
if "%ERRORLEVEL%"=="0" goto 10
date/t|find "-11-" > nul
if "%ERRORLEVEL%"=="0" goto 11
date/t|find "-12-" > nul
if "%ERRORLEVEL%"=="0" goto 12
:1
copy 001.txt \1
goto end
:2
copy 001.txt \2
goto end
:3
copy 001.txt \3
goto end
:4
copy 001.txt \4
goto end
:5
copy 001.txt \5
goto end
:6
copy 001.txt \6
goto end
:7
copy 001.txt \7
goto end
:8
copy 001.txt \8
goto end
:9
copy 001.txt \9
goto end
:10
copy 001.txt \10
goto end
:11
copy 001.txt \11
goto end
:12
copy 001.txt \12
goto end
:end
这样行吗?
[ Last edited by driver1998 on 2008-5-30 at 04:01 PM ]
论坛跳转: