批量刪除LR運行垃圾文件

在調試LR腳本,經常產生很多log文件,可以使用如下腳本刪除垃圾文件

在window下系統,新建bat文件,文件內容如下:


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





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章