0 LIKES
Snippet
Alias_mkf
In Category General IRC Posted by Aikon On 07/23/11
Three short aliases that create folders...
fdate and ftime (short for 'folder date' and 'folder time') can potentialy be used for other things, such as when you need to display the time in chat, or making log folders.
"
(event)
echo $target $+([,ftime,]<,$nick,>) ...
write $mkf(logs,fdate,$target) ...
"
you get the idea...
feel free to change these as you want, please send me a copy of whatever you make.
fdate and ftime (short for 'folder date' and 'folder time') can potentialy be used for other things, such as when you need to display the time in chat, or making log folders.
"
(event)
echo $target $+([,ftime,]<,$nick,>) ...
write $mkf(logs,fdate,$target) ...
"
you get the idea...
feel free to change these as you want, please send me a copy of whatever you make.
/* File Name: alias_mkf.mrc [version 0.5] Author: ThatGuyâ„¢ (ClanAikon) Created: July 20, 2011 at 11:42:33 PM Last Updated:July 23, 2011 at 12:15:26 PM */ alias mkf { tokenize 32 $1- var %a 1 while (%a <= $numtok($1-,32)) { var %b $+(%b,$gettok($1-,%a,32),\) ;if (!$isdir(%b)) { mkdir %b ;} inc %a } } /* Use: /mkf foldername1 foldername2...foldernameN if you want to make more than one sub folder in any given folder simply repeat the command "/mkf foldername1 foldername2.5" and you now have two second level sub folders! Note: This can potentialy make an infinate amount of nested folders. I tested it up to one hundred nested folders with no problems */ ;~^v~^v~^v~^v~^v~^v~^v~^v~^v~^v alias fdate { return $date(dddd-mmmm-dd-yyyy) } alias ftime { return $time(hh.nn.ss.TT) } /* Use: /mkf logs fdate Now you can have you log files sorted by date with a few keystrokes! ~^v~^v~^v~^v~^v~^v~^v~^v~^v~^v And now a word from the author: I realize the /* comments */ are taking up more space than the actual code...if that's a problem just remove the comments...problem solved! If you use this snippet, change it or use this concept in your projects, all I ask is that you send me a copy of what you did. You can send me a message on TG007.net, username Aikon, and I will reply with my email address.. ]|[43 lines - 1.3k]|[ ]|[END OF FILE]|[
Comments 0
You must be logged in to comment.