nav.gif Home » Snippets » Alias_mkf

ammenul.gif
ammenur.gif
Please Register/Login to enhance your access of our site and services. We support Twitter and Facebook logins. Logging in will reduce the amount of advertisments.
ammenul.gif
ammenur.gif


ammenutopl.gif
TG007 Snippet
ammenutopr.gif
Alias_mkf
Category: General IRC

About
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.


/*
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

No Comments Posted
Sorry you must register and log-in to post comments
ammenul.gif
ammenur.gif
ammenutopl.gif
Info
ammenutopr.gif
Snippet Information
Creator:aikon
Date Added:7/23/11
Tags:
Problem?Report Snippet
ammenul.gif
ammenur.gif



17 user(s) currently browsing site (0 members, 17 guests, 0 anonymous)
No Members Logged In

11 Users in IRCommunity
inføвøт, err0r, ●fiestýβสbỳ●, båbyġurł, DennieWennie™, Erroneous, payback, TOP™, ﴾Ɣ﴿ⓨⓢⓣⓘⓒ★§ⓟⓔⓛⓛ, danger , extremity



lhfooter.gif
TechDesigns007.com | Valid XHTML 1.0 | Valid CSS | Load Time: 0.039332 sec(s)
rfooter.gif


Latest Alert: 10.14.2011 mIRC 7.22 released
oldline
oldline
oldline
oldline