続く
一部のファイル (ファイル パターン) を除くすべてのファイルを DOS コマンドから移動する
そのバッチ ファイルを使用して、リリース ディレクトリから展開ディレクトリにすべてのファイルをコピーします。
echo off
set "source=.\EasyRun\bin\Release\"
set "destination=C:\temp\EasyRun\"
IF exist %destination% rd %destination% /s /Q
IF exist %source% ( echo "OK release") ELSE ( echo "NO Realease DIR "%source% && pause && exit )
dir /b /a-d %source%|findstr /b "vshost" > excludeList.txt
xcopy /s %source%"*.exe" %destination% /exclude:excludeList.txt
xcopy /s %source%"*.dll" %destination%
echo "OK!!"
Pause
したがって、ここに 2 つの問題があります。
- excludeList が満たされておらず、ファイルが空です
- 手動で.\EasyRun\bin\Release*.vshost.exeを入れても、xcopyはそれをコピーから除外しません。
ありがとう