![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-09-28 07:39 |
共 47,813 主题排行 / 349,918 发帖 / 今日 0 篇 / 48,277 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » 按月COPY文件到不同的目录 |
| 可打印版本 974 / 1 |
| 第1楼 yqlv | 发表于 2008-04-14 08:17 |
| 新手上路 发帖 3 积分 10 | |
|
按月COPY文件到不同的目录 我有一个目录里,有好多的文件,我想把它整理一下,按照月COPY到不同的目录里,该如何做?
|
|
| 第2楼 driver1998 | 发表于 2008-05-30 15:55 |
| 高级用户 发帖 373 积分 740 来自 中国,广东 | |
|
: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 ] |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |