mIRC Home    About    Download    Register    News    Help

Print Thread
#62944 05/12/03 06:37 PM
Joined: Nov 2003
Posts: 257
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
when i send this command it dones't open or write the files to a txt properly, is there anything i am missing?

alias mpeg.list {
%mpeg.l.total = $findfile(%mpeg.dir,*.mp3,0) | %mpeg.l.num = 0 | %mpeg.l.size = 0
write -c $mircdirmp3-list.txt reloaded mp3 list
write $mircdirmp3-list.txt $chr(160)
write $mircdirmp3-list.txt directory: $+ %mpeg.dir
write $mircdirmp3-list.txt $chr(160)
:incl
inc %mpeg.l.num 1 | if (%mpeg.l.num > %mpeg.l.total) { goto end }
else {
.write $mircdirmp3-list.txt $lower($nopath($findfile(%mpeg.dir,*.mp3,%mpeg.l.num))) - $round($calc($lof($findfile(%mpeg.dir,*.mp3,%mpeg.l.num)) / 1000000),2) mb
%mpeg.l.size = $calc($lof($findfile(%mpeg.dir,*.mp3,1)) + %mpeg.l.size)
.goto incl
}
:end
write $mircdirmp3-list.txt $chr(160)
write $mircdirmp3-list.txt total: $+ $findfile(%mpeg.dir,*.mp3,0) files $+ \ $+ $round($calc(%mpeg.l.size / 1050000),2) mb
eca $dot text file complete! opening file.
run mp3-list.txt
unset %mpeg.l.*
}

#62945 05/12/03 07:27 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
as a recommendation, rather then using a loop through the directory, look up the syntax on $findfile. you can specify a command to execute for every file found. Much faster and easier.


-KingTomato

Link Copied to Clipboard