@ECHO OFF :: DelHist.bat :: :: Deletes History files and Recent Documents links (in start menu) :: :: For the history files: only delete the index.dat files in each subdir :: because deleting the whole History folder can result in errors (at :: least Microsoft says!). :: Still working on this one! :: :: AUTHOR: Parcifal Aertssen :: http://www.aqtronix.com ECHO. ECHO Removing History files and Recent Documents links, please wait... ECHO ______________________________________________________________ IF "%OS%"=="Windows_NT" GOTO Windows_NT :: *************************************************************** :: * * :: * Windows 95,98,ME stuff * :: * * :: *************************************************************** :: Delete all History files DELTREE /Y "%WINDIR%\History\*" DELTREE /Y "%WINDIR%\Profiles\%USERNAME%\History\*" :: Remove Recent Documents DELTREE /Y "%WINDIR%\Recent\*" DELTREE /Y "%WINDIR%\Profiles\%USERNAME%\Recent\*" GOTO End :Windows_NT :: *************************************************************** :: * * :: * windows NT,2000,XP stuff * :: * * :: *************************************************************** :: Delete History Files (index.dat) but not Desktop.ini (hidden) DEL /a-h-s /s /q /f "%USERPROFILE%\Local Settings\History" :: Recent Documents except Desktop.ini (hidden) DEL /a-h-s /s /q /f "%USERPROFILE%\Recent" GOTO End :End ECHO ______________________________________________________________ ECHO Done removing History files and Recent Documents links. ECHO.