開發出來的LR腳本,執行次數多了,就會包含很是多的中間文件,佔地方,因此有時須要清除掉spa
能夠寫一個簡單的腳本,清理掉這些文件,腳本內容以下:debug
echo off cls echo. echo. echo This batch file will delete the following files from every echo folder and subdirectory from the folder in which it is run: echo. echo *.idx echo mdrv*.log echo mdrv.txt echo options.txt echo *.ci echo combined_*.c echo output.txt echo debug.inf echo *.bak echo \result1 echo. echo. if exist %temp%\FilesDeleted.txt del %temp%\FilesDeleted.txt del *.idx /s >%temp%\FilesDeleted.txt del mdrv*.log /s >>%temp%\FilesDeleted.txt del mdrv.txt /s >>%temp%\FilesDeleted.txt del options.txt /s >>%temp%\FilesDeleted.txt del *.ci /s >>%temp%\FilesDeleted.txt del combined_*.c /s >>%temp%\FilesDeleted.txt del output.txt /s >>%temp%\FilesDeleted.txt del debug.inf /s >>%temp%\FilesDeleted.txt del *.bak /s >>%temp%\FilesDeleted.txt rd result1 /s /q "Notepad.exe" "%temp%\FilesDeleted.txt" del %temp%\FilesDeleted.txt
將腳本保存爲bat格式的,放在咱們開發的腳本目錄下,點擊執行如下就好了code
注意:清除腳本中的路徑爲當前路徑,刪除的文件是當前路徑下的符合格式的文件,不要放錯了路徑,一不當心,把不應刪除的刪除了,那就後悔啦blog