mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 43
K
Kazz Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Feb 2003
Posts: 43
how do you pull a random file from a specified directory?


smirk Mr.Newb smirk
A.K.A Kazz
Joined: Dec 2003
Posts: 199
K
Vogon poet
Offline
Vogon poet
K
Joined: Dec 2003
Posts: 199
//echo -a $findfile(DIR,*.FILETYPE,$rand(1,$findfile(DIR,*.FILETYPE,0)))
-Krim


Want to Link Servers? PM Me
- EliteIRC.dyndns.org -
Joined: Jan 2004
Posts: 24
W
Ameglian cow
Offline
Ameglian cow
W
Joined: Jan 2004
Posts: 24
Do this:
alias randfile {
set %i $rand(1,$findfile(C:\,*,0))
set %randfile $findfile(C:\,*,%i)
echo -a %randfile
}
This will put a random file from a random directory in C:\ driver, and echo it's name to you.
hope this is what you wanted.


Link Copied to Clipboard