Solution for convenient delete the old logs and dumps.

Newbie Spellweaver
Joined
Oct 14, 2008
Messages
29
Reaction score
15
One more my little release of my old stuff.

In 2009 when I was fond of active creation of "my ideal server RYL1",I thought about how to simplify, in a single click, delete all old log files for convenience.

I Found VBScript, little has changed it. For convenient use of directories and file types to remove, duplicated three copies of the script.
And I created a .bat file for easy launch scripts.

An example and description of script:

Highlighted in green, you can edit.
In the early lists all the folders in which files should be checked.
Then determine the type of files that are checked.
And in the end is determined, the days of old files to delete.
If you leave the number 1, then after cleaning will remain only today's files.
If you assign the number -1, we will remove all log files and all folders will be empty, I use it, I recommend!

If desired, the standard Windows Task Scheduler to run your .bat file every day or once a week, and then the cleaning will be fully automatic.

I am all these years in the scripts used direct paths, but for your convenience in the archives I have prepared a script with relative paths.
I hope those who will use it will be skilled enough to figure out how to set up their own paths.
Because I do not use the standard architecture of the server folders.

By the way, I would recommend for experienced users who are just starting to create your own server: Try as I, server files + manage tool + admin tool + config tool, all in one folder.
It's really convenient than all in separate folders, and more convenient to adjust the script delete log files.
See screenshot:

But then you need to fix one little thing: for the admin tool, change format from one configuration file - AdminServerInfo.txt , .txt to .ini, so that the script of removes the logs did not remove it.
But it just is not enough to change the format, you also need to find and change the references to the file, using HEX editor in AdminManagerServer.exe
But that's another story ...




View attachment deloldlog.zip - Okay, just unpack and put the folder - deloldlog, on par with the release folder.
In .vbs files, configure the correct path.
For cleaning old logs, just run .bat file.
.bat file is not necessary to configure, there are relative paths.
To run from the desktop - create shortcut.
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Mar 2, 2010
Messages
14
Reaction score
0
Re: [Share] Solution for convenient delete the old logs and dumps.

Hmm very nice coding sir, I might try these aswell