Jump to content

*.Log & *.Txt


Recommended Posts

I was just wondering, is it safe to remove all the log and text files in the %systemroot% folder cus if it is and the reason no-one does it is because takes too long to write all the file names out then here is a solution

CLS
@ECHO OFF
ECHO.
ECHO Removing all text files and logs from the windows directory
ECHO Please wait...
for %%t in (txt) do del "%systemroot%\*.txt"
for %%t in (log) do del "%systemroot%\*.log"
ECHO.

please tell me it is safe, i cant think of a reason why it wouldnt be

Lee...

Link to comment
Share on other sites


Can't see why not, log and txt files are not crucial to an Operating System's functionality. Some will get recreated depending on what you install/change to the OS at a later time.

Link to comment
Share on other sites

deltree /y C:\windows\*.log

deltree /y C:\windows\debug\*.log

deltree /y C:\windows\debug\usermode\*.log

deltree /y C:\windows\pchealth\helpctr\logs\*.log

deltree /y C:\windows\repair\*.log

deltree /y C:\windows\security\*.log

deltree /y C:\windows\security\logs\*.log

deltree /y C:\windows\system32\*.log

deltree /y C:\windows\system32\catroot2\*.log

deltree /y C:\windows\system32\msdtc\*.log

deltree /y C:\windows\system32\msdtc\trace\*.log

deltree /y C:\windows\system32\wbem\logs\*.log

I have cleaned up the log files with no side effects here are the commands above.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...