回复 11# 开心旺旺
自己写入,自己还要删除,自己占自己肯定不行啊。那就一步一步来,先删了在拷贝呗。- @echo off
- set "排除=已备份;A;B"
- set "拷贝到=2015-8-21"
- for /f "delims=" %%i in ('dir /ad /b') do (
- for %%a in (%排除%) do (
- if "%%i" equ "%%a" set c=1
- )
- if not defined c if "%%i" neq "%拷贝到%" (
- rd /s /q "%拷贝到%\%%i" 2>nul
- move /y "%%i" "%拷贝到%" 2>nul
- set c=
- )
-
- )
- pause & exit /b
复制代码
|