Board logo

标题: 按月COPY文件到不同的目录 [打印本页]

作者: yqlv     时间: 2008-4-14 08:17    标题: 按月COPY文件到不同的目录
我有一个目录里,有好多的文件,我想把它整理一下,按照月COPY到不同的目录里,该如何做?

作者: driver1998     时间: 2008-5-30 15:55
: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 ]