
CODE: [Copy to clipboard]@echo off
set SrcDir=C:\test\projects
set DstDir=C:\test\output
for /f "tokens=*" %%a in ('dir /s /b /a-d "%SrcDir%"^|findstr /i "\\bin\\"') do (
echo n|copy /-y "%%a" "%DstDir%"
)
CODE: [Copy to clipboard]@echo off
set SrcDir=C:\test\projects
set DstDir=C:\test\output
for /f "tokens=*" %%a in ('dir /s /b /a-d "%SrcDir%"^|findstr /i "\\bin\\debug\\"') do (
echo n|copy /-y "%%a" "%DstDir%"
)
CODE: [Copy to clipboard]@echo off
setlocal enabledelayedexpansion
set SrcDir=C:\test\projects
set DstDir=C:\test\output
for /f "tokens=*" %%a in ('dir /s /b /a-d "%SrcDir%"^|findstr /i "\\bin\\debug\\"') do (
if exist "%DstDir%\%%~nxa" (
echo "%%~dpa"|findstr "%%~na">nul 2>nul
if !errorlevel! equ 0 (
copy /y "%%a" "%DstDir%"
)
) else (
copy "%%a" "%DstDir%"
)
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |