xcopy /t 可以复制文件结构,而不复制文件,这样在后面时候可以少个判断- @echo off
- set "xl=F:\XunLei\原创精品电影1000GB电影\"
- set "bt=E:\BitComet\原创精品电影1000GB电影\"
- xcopy "%xl%" "%bt%" /T /Y
- for /f "delims=" %%i in ('dir /a-d /b /s "%xl%"^|findstr /ilve ".bt.xltd"') do (
- set "exclude=%%i"
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in ("!exclude:%xl%=%bt%!") do (
- endlocal
- if exist "%%a.bc!" del "%%a.bc!"
- if not exist "%%a" copy "%%i" "%%a" /b /y
- )
- )
- pause
复制代码
|