rem cdif.bat @echo off if '%1'=='' exit /B 255 pushd D:\temp ← .defファイルを保存する場所 setlocal set z=%* set y=%z: =% set x=%y:/=% %* > %x%.txt if not exist %x%.def goto _new set errorlevel= diff %x%.def %x%.txt if %errorlevel% == 0 goto _end :_new copy /Y %x%.txt %x%.def >nul :_end endlocal popd
パラメ−タにコマンドを置くと前回実行結果との違いを表示する 例 cdif whoami /all cdif net start cdif assoc