Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

Skip to comments.

Ever wonder how many .LOG files are lurking on your Windows PC?
6/26/2023 | vanity

Posted on 06/26/2023 3:18:01 PM PDT by entropy12

Windows 10 just loves to create Log files. Those take up space on hard drive. In 28 years of using Windows, I never have found any use for these log files. May be Bill Gates looks at them from your PC. To me they are totally useless, taking up space and slowing down my PC by few micro-seconds for each access. I created this program to delete every one of those log files. Simply double click on the shortcut Logs-Del on your main desktop window and the program does the rest. This program deletes only LOG files, nothing else.

Create Folder C:\LogFiles Using Notepad editor, open a new text file. Copy and paste following Powershell command into that text file:

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""C:\LogFiles\Logs-Del.ps1""' -Verb RunAs}"

Save that text file with name Logs-Del.bat into the already created folder C:\LogFiles

Using Notepad editor, open a new text file. Copy and paste following 6 lines into that text file:

Get-EventLog -LogName * -PipelineVariable log timeout /t 10 wevtutil el | Foreach-Object {Write-Host "Clearing $_"; wevtutil cl "$_"} timeout /t 01 Get-EventLog -LogName * -PipelineVariable log timeout /t 10

Save that text file with name Logs-Del.ps1 into created folder C:\LogFiles

You are almost done! Using Windows File Explorer, right click on C:/LogFiles/Logs-Del.bat and send it to Desktop.

Now you will have a shortcut on your main screen called Logs-Del. To run this program Double click on it.

When PowerShell is entered, program will pause and ask your permission to proceed. You can either proceed or abort.

First this program will list all the log files in your Windows Folder. Make a note of how many log files are taking up space just for fun.

You will have 10 seconds yo make a note of this list of log files. Next the program will search all sub-folders inside Windows folder and delete them. You will see display of each Windows folder undergoing search for Log files.

When all done, program will display new count of log files remaining in Windows folder. You will have 10 seconds to read this small list.


TOPICS: Chit/Chat; Computers/Internet
KEYWORDS: microsoft; vanity; windows; windows10
Navigation: use the links below to view more comments.
first 1-2021-4041-50 next last

1 posted on 06/26/2023 3:18:02 PM PDT by entropy12
[ Post Reply | Private Reply | View Replies]

To: entropy12

those 6 lines got combined by FR editor.
They look like below:

Get-EventLog -LogName * -PipelineVariable log

timeout /t 10

wevtutil el | Foreach-Object {Write-Host “Clearing $_”; wevtutil cl “$_”}

timeout /t 01

Get-EventLog -LogName * -PipelineVariable log

timeout /t 10


2 posted on 06/26/2023 3:22:50 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12

Bkmk


3 posted on 06/26/2023 3:35:00 PM PDT by Impala64ssa (81 million votes my ass!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12

Later.


4 posted on 06/26/2023 3:40:52 PM PDT by wjcsux (On 3/14/1883 Karl Marx gave humanity his best gift, he died. )
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12
Would a batch file with a simple - del *.log - work as well
in the appropriate directory/folder?
5 posted on 06/26/2023 3:54:15 PM PDT by philman_36 (Pride breakfasted with plenty, dined with poverty and supped with infamy. Benjamin Franklin)
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12
Ever wonder how many .LOG files are lurking on your Windows PC?

No. I delete them all the time.

6 posted on 06/26/2023 3:57:35 PM PDT by TomServo
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12

the biggest win by far is to disable automatic CBS logging via the registry ... I’ve seen this fill up system drives and prevent booting ... AND CBS logging is utterly useless ...


7 posted on 06/26/2023 4:03:56 PM PDT by catnipman (In a post-covid world, ALL "science" is now political science: stolen elections have consequences)
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12

Later


8 posted on 06/26/2023 4:08:28 PM PDT by Pontiac (The welfare state must fail because it is contrary to human nature and diminishes the human spirit.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: catnipman

Thanks. I’ll look into it.


9 posted on 06/26/2023 4:24:39 PM PDT by plain talk
[ Post Reply | Private Reply | To 7 | View Replies]

To: entropy12

.


10 posted on 06/26/2023 5:06:05 PM PDT by sauropod (“If they don’t believe our lies, well, that’s just conspiracy theorist stuff, there.”)
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12

Does this apply to Win-7 Pro x64?


11 posted on 06/26/2023 5:28:13 PM PDT by Carriage Hill (A society grows great when old men plant trees, in whose shade they know they will never sit.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: entropy12

Most of us with IT Certifications know EXACTLY what these files are used for.

(unfortunately, I don’t have any IT certifications)


12 posted on 06/26/2023 5:38:06 PM PDT by BobL
[ Post Reply | Private Reply | To 1 | View Replies]

To: Carriage Hill

With Windows Explorer, I found 241 *.LOG files; largest is 3,790kb, but most were under 10kb.


13 posted on 06/26/2023 5:51:26 PM PDT by Carriage Hill (A society grows great when old men plant trees, in whose shade they know they will never sit.)
[ Post Reply | Private Reply | To 11 | View Replies]

To: Carriage Hill

I don’t see why not.


14 posted on 06/26/2023 5:53:50 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 11 | View Replies]

To: BobL

I have been using MD-DOS since 1986, and Windows since 1995, NOT ONCE I had any use out of this LOG files. I was manager of a huge engineering group using many different types of work stations. Not even once I had any use out of these Log files. My PC usually has 10-15k of them at any one time.


15 posted on 06/26/2023 5:56:51 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 12 | View Replies]

To: catnipman

I have been working with PC’s since 1986. Can’t remember even once I learned anything useful looking at Log files.


16 posted on 06/26/2023 5:58:22 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 7 | View Replies]

To: entropy12

Should I make a copy of the folder, before just deleting them manually?


17 posted on 06/26/2023 5:59:13 PM PDT by Carriage Hill (A society grows great when old men plant trees, in whose shade they know they will never sit.)
[ Post Reply | Private Reply | To 14 | View Replies]

To: philman_36

No because there are like 5000 folders and sub-folders inside Windows main folder and you do not always have permissions to delete them. The program I posted acts as administrator temporarily and can delete any log file out there.


18 posted on 06/26/2023 6:00:43 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 5 | View Replies]

To: Carriage Hill

There are so many sub-folders inside Windows main folder, it will take better part of whole day to find all those sub-folders.


19 posted on 06/26/2023 6:02:28 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 13 | View Replies]

To: Carriage Hill

I have used this program dozens of times on various different PC’s and never had to backup anything before running this.


20 posted on 06/26/2023 6:04:23 PM PDT by entropy12 (Career politicians like DeSantis are theryre to build wealth, Trump is there to serve & lose wealth)
[ Post Reply | Private Reply | To 17 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-4041-50 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson