A few years ago I discovered this datestamp command-line script called Stampme.cmd (see http://www.gammon.com.au/forum/bbshowpost.php?id=10292), which I use to datestamp my log files (html in my case), and -usually- keep them down under 10MB or so.
Just today I integrated the utils.shellexecute() function to run this within OnPluginDisconnect() and successfully killed off an entire running process (I WAS running MUSHClient.exe out of a command script before and calling archive.bat on close).
And yes, just so you know, utils.shellexecute() IS I believe on the recommended-to-sandbox-out list of possibly dangerous functions.
Anyhow, I've gone and zipped it all up (including the bat and cmd files) and posted it on Google Code: http://depwl9992-mushclient.googlecode.com/files/ArchiveLogs.zip
Load the plugin, edit archive.bat in a text editor to reflect your own log filenames in the given format, and when you disconnect from any world where the plugin is loaded into, the script will be run and the log will be datestamped within the filename.
You could edit stampme.cmd line:
and switch up the _yy, _mm, _dd, _hr, and _min variables to change up the format of your filename, but as is, it should be fairly self-explanatory.
Just today I integrated the utils.shellexecute() function to run this within OnPluginDisconnect() and successfully killed off an entire running process (I WAS running MUSHClient.exe out of a command script before and calling archive.bat on close).
And yes, just so you know, utils.shellexecute() IS I believe on the recommended-to-sandbox-out list of possibly dangerous functions.
Anyhow, I've gone and zipped it all up (including the bat and cmd files) and posted it on Google Code: http://depwl9992-mushclient.googlecode.com/files/ArchiveLogs.zip
Load the plugin, edit archive.bat in a text editor to reflect your own log filenames in the given format, and when you disconnect from any world where the plugin is loaded into, the script will be run and the log will be datestamped within the filename.
You could edit stampme.cmd line:
REN "%_pathname%" "%_file%-%_yy%-%_mm%-%_dd% - %_hr%-%_min%%_ext%"
and switch up the _yy, _mm, _dd, _hr, and _min variables to change up the format of your filename, but as is, it should be fairly self-explanatory.