mIRC Home    About    Download    Register    News    Help

Print Thread
ok.....here's one #267295 12/05/20 10:52 AM
Joined: Dec 2019
Posts: 14
Q
quartz Offline OP
Pikka bird
OP Offline
Pikka bird
Q
Joined: Dec 2019
Posts: 14
I've tried combinations of [ ]

/set %dirget f:\dir\folder\sub\MAIN

(this directory has 5 sub folders)


//echo -s total $dir_t(%dirget,1)

alias dir_t {
set %dir_t $+ $gettok($1,1-5,92) $+ $count($1,\) $finddir($1,*,0,1)
echo -s return %dir_t $+ $gettok($1,1-5,92) $+ $count($1,\)
}

the /set line, gives me

%dir_tf:\dir\folder\sub\MAIN4 5

which is fine

the /echo line, gives me

return f:\dir\enc\sites\ACLS4

which isn't right, I want it to return "5" -- it's forgetting the %dir_t part

appreciated's

Re: ok.....here's one [Re: quartz] #267296 12/05/20 01:27 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code
echo -s $eval($+(%,dir_t,$gettok($1,1-5,92),$count($1,\)),2)

Re: ok.....here's one [Re: hixxy] #267301 12/05/20 05:35 PM
Joined: Dec 2019
Posts: 14
Q
quartz Offline OP
Pikka bird
OP Offline
Pikka bird
Q
Joined: Dec 2019
Posts: 14
mint, gracias.