Jump to content

*.log-files in c:\WINDOWS\system32\config


_hunter

Recommended Posts


Probably, some of these files can be moved and deleted

C:\WINDOWS\system32\config

The config folder contains the Registry Hives used during bootup, and is the storage location for the System, Security, and Application log files viewed through Event Viewer.

I delete every file in the config folder that Windows will allow me to. Windows will not allow you to delete of some files in the config folder. This is because these files represent the actual registry.

All other files in the config folder can be deleted without any problems to your system.

From Bold fortune's guide

Link to comment
Share on other sites

Sorry, I think I don't follow you.

.log files in other folders usually are garbage. If everything is working as it should, you can safely move or delete those files.

You can do this by hand or you can write a batch file, or you can write a program for that. Whichever way you like.

If this is what you want to do, I'll write you a simple batch file.

Rem Opening C: drive and then root dir of C: drive

Rem --------------------------------------------------------

C:

cd \

Rem --------------------------------------------------------

Rem creates temporary directory where we will move log files

Rem --------------------------------------------------------

md LogFiles

Rem --------------------------------------------------------

Rem Opening Logfiles dir

Rem --------------------------------------------------------

cd LogFiles

Rem --------------------------------------------------------

Rem Within C:\Logfiles dir creates System32 dir

Rem --------------------------------------------------------

md System32

Rem --------------------------------------------------------

Rem Again opening root dir of the C: drive

Rem --------------------------------------------------------

cd \

Rem --------------------------------------------------------

Rem Opening Windows directory

Rem --------------------------------------------------------

cd %windir%

Rem --------------------------------------------------------

Rem Copying all log files from windows dir to C:\Logfiles dir

Rem After that deleting all .log files from windows dir

Rem --------------------------------------------------------

copy *.log C:\Logfiles\*.log

del *.log

Rem --------------------------------------------------------

Rem Opening Windows\System32 directory

Rem --------------------------------------------------------

cd %windir%\System32

Rem --------------------------------------------------------

Rem Copying all log files from windows\System32 dir to C:\Logfiles\System32 dir

Rem After that deleting all .log files from windows\System32 dir

Rem --------------------------------------------------------

copy *.log C:\Logfiles\System32\*.log

del *.log

Rem --------------------------------------------------------

Open notepad, paste this text, "File\Save as" and in File name enter (with quotes!): "Log.bat"

Now you have a batch file that (when you execute it) will move all log files from Windows and Windows\System32 to C:\Logfiles and C:\Logfiles\System32

Right click on this file (Log.bat) and select edit. Now you can change it to fit your needs. Google for more info. about batch files, there is plenty of it on the internet.

Edited by Vaidelotis
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...