Auto Clean Up Old Files (windows batch command)
Besides those VBScript I have written in my previous post, I have found the below script in the internet for clean up old log files.
This script is using standard Windows batch file. It is much more neat and simple.
::
:: clean_all.bat
::
:: simple script, deletes trace files over 30 days old
::
:: Mark Sorger - 03/05/2008
::
:: Get rid of files using forfiles utility
dir c:\oracle\product\10.2.0\admin\orcl\bdump
forfiles /p c:\oracle\product\10.2.0\admin\orcl\bdump /m *.trc /d -30 -c "cmd /c del/q @FILE"
dir c:\oracle\product\10.2.0\admin\orcl\bdump
exit
This script is using standard Windows batch file. It is much more neat and simple.
::
:: clean_all.bat
::
:: simple script, deletes trace files over 30 days old
::
:: Mark Sorger - 03/05/2008
::
:: Get rid of files using forfiles utility
dir c:\oracle\product\10.2.0\admin\orcl\bdump
forfiles /p c:\oracle\product\10.2.0\admin\orcl\bdump /m *.trc /d -30 -c "cmd /c del/q @FILE"
dir c:\oracle\product\10.2.0\admin\orcl\bdump
exit
Comments