
CODE: [Copy to clipboard]你建个 output 目录,然后放里面直接运行试试看。@echo off
if not exist DeBug md DeBug
if not exist Release md Release
for /f "delims=" %%i in ('dir../ad/b') do (
copy "..\%%i\DeBug\*.dll" DeBug 2>nul
copy "..\%%i\DeBug\*.xml" DeBug 2>nul
copy "..\%%i\Release\*.dll" Release 2>nul
copy "..\%%i\Release\*.xml" Release 2>nul
)
CODE: [Copy to clipboard]@echo off
if not exist DeBug md DeBug
if not exist Release md Release
for /f "delims=" %%i in ('dir../ad/b') do (
copy "..\%%i\bin\DeBug\*.dll" DeBug 2>nul
copy "..\%%i\bin\DeBug\*.xml" DeBug 2>nul
copy "..\%%i\bin\Release\*.dll" Release 2>nul
copy "..\%%i\bin\Release\*.xml" Release 2>nul
)
CODE: [Copy to clipboard]你把 src 和 dst 按自己要求设置下@echo off
set src=D:\ProjectBag
set dst=D:\Output
if exist "%dst%" rd /s/q "%dst%"
md "%dst%\DeBug"
md "%dst%\Release"
for /f "delims=" %%i in ('dir "%src%" /ad/b') do (
copy "%src%\bin\DeBug\*.dll" "%dst%\DeBug"
copy "%src%\bin\DeBug\*.xml" "%dst%\DeBug"
copy "%src%\bin\Release\*.dll" "%dst%\Release"
copy "%src%\bin\Release\*.xml" "%dst%\Release"
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |