Empty logs cleanup

Forum for game modifications and custom clients.

Empty logs cleanup

Postby Chrumps » Thu Oct 06, 2016 8:07 am

The growing number of 0-length chat logs became increasingly annoying to me. I have googled a bit and I have put together a nice batch file to remove empty files and empty folders from the logs folder.

Code: Select all
@echo off
for /r %%F in (*) do if %%~zF==0 del "%%F"
robocopy . . /s /move

Create a new text file inside the logs folder, paste the code above into it and finally rename the file into something like cleanup.bat. Run and enjoy.
Posts: 594
Joined: Wed Apr 09, 2014 9:51 pm
Location: Poland

Re: Empty logs cleanup

Postby Kandarim » Thu Oct 06, 2016 9:51 am

I like the robocopy solution to getting rid of empty directories :) was not aware of that one.
I have neither the crayons nor the time to explain it to you.
JC wrote:I'm not fully committed to being wrong on that yet.
User avatar
Posts: 5318
Joined: Mon Jan 21, 2013 4:18 pm

Return to Artifice & Arcana

Who is online

Users browsing this forum: No registered users and 6 guests