Page 1 of 1

Empty logs cleanup

PostPosted: Thu Oct 06, 2016 8:07 am
by Chrumps
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.

Re: Empty logs cleanup

PostPosted: Thu Oct 06, 2016 9:51 am
by Kandarim
I like the robocopy solution to getting rid of empty directories :) was not aware of that one.