| ; invalid destination folder
if you want to add a comment to the end of a line you need to use a | before it.
the | is a command seperator (rather than a output pipe director)
ex: //echo hello | echo blah
hello
blah
so yes you just remove the | as well, i have included a un documented copy here
** one small addition i placed a . infront of the /remove command so it doesnt display the file removed message **
;usage $splitup(source,destination folder/file) * Do not add .txt!
;
alias Splitup {
if (!$isfile($1)) { return -1 }
if (($nofile($2)) && (!$isdir($v1))) { return -2 }
if (!$mkfn($nopath($2))) { return -3 }
var %i = 1
filter -cffr 1-5000 $+(",$1,") $+(",$nofile($2),$mkfn($nopath($2)),%i,.txt")
while ($filtered) {
inc %i
filter -cffr $+($calc(%i * 5000 - 4999),-,$calc(%i * 5000)) $+(",$1,") $+(",$nofile($2),$mkfn($nopath($2)),%i,.txt")
}
.remove $+(",$nofile($2),$mkfn($nopath($2)),%i,.txt")
dec %i
return %i
}
PS: incase your having trouble cutting and pasting this into mirc, you copy it, paste into wordpad, then copy it from there and paste into mirc, this is a problem with this forum and the way explorer (i think) copies text from it)
What is the correct command line entry for your alias if it becomes functioning for a mIRC folder named Test and the original Filename Fatext.txt in that folder to split up?
.method1
/Splitup sourcefile destinationfile
sourcefile is the exact filename ex blahblah.txt or c:\wobble\blah.txt etc
destinationfile is the fileto split into minus the .txt ex blob or c:\stats\blob etc
.method2
var %filecount = $Splitup(sourcefile,destinationfile)
sourcefile is the same as in method one, but can now also be
big file.txt or
c:\my folder\blah file.txtdestination file is the same, but may also contain spaces like sourcefile
you need to do it this way, becuase mirc doesnt handle spaces in filenames passed to the routine well
amagine
/splitup text file results
is it
text & file results
or
text file & results
or even
text & file & ignore the word results!