Logging and creating missing folders

Posted by Coderunner on Tue 08 Nov 2011 10:13 PM — 2 posts, 12,575 views.

USA #0
Hello,

I'm trying to automatically log my sessions, but it seems like MUSHclient doesn't automatically create any folders if they don't exist, and I think it'd be really awesome to be able to automatically log to a file like this:
%L%N\%Y\%b\%m-%d.txt

So each day, a new file would be created, in folders sorted by year, then further sorted by month. So you'd have a structure like <world>\2011\Nov\11-08.txt
Then every month, a new month folder would be created, and at the beginning of each year, a new year folder would be created, and a Jan folder created under it.

Thanks.
Amended on Tue 08 Nov 2011 10:18 PM by Coderunner
Australia Forum Administrator #1
It doesn't automatically create directories, but you could script that.

http://www.gammon.com.au/scripts/doc.php?lua=os.execute

Use os.execute to make a directory. After all, you only need to make 13 a year (one for the year plus one for the month).