mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2008
Posts: 13
T
tessa1 Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Jan 2008
Posts: 13
I often get spammed by a friend with alot of picture.

summer_2009_v1.....jpg
winder_2008_v5......jpg etc.

How do I change the download directory depending on what he is sending me..

Like this :

If filename has summer download to C:\pic\summer
if filename has winter download to C:\pic\winter

Any easy way to do this ?

thanks

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While I can't think of a way to change the download directory based upon the details of your request, what you could do, is to wait until the download is finished, then move the download to the directory you want.
Code:
on *:filercvd:{
  ;after a file has been received
  if (summer isin $filename) || (winter isin $v2) {
    ;check if summer or winter is in the file name
    .copy $filename c:\pic\ $+ $v1
    ;if it is, then copy the file to the appropriate directory
    .remove $filename
    ;then remove the file from the default download directory
  }
}

Comments added to explain the code.

Joined: Jan 2008
Posts: 13
T
tessa1 Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Jan 2008
Posts: 13
That should work fine too, thanks for the help RusselB !

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Instead of moving the file afterwards, you can tell mirc to save it to the right folder. The DCC Get Folders feature is designed exactly for this purpose: Alt+O -> DCC -> Folders

If you want greater control over where each file goes (eg send only certain files from certain people somewhere), you can use the CTCP event and /dcc get:
Code:
ctcp *:dcc send:?:{
  if *summer*.jpg iswm $3 && $nick == YourFriend { dcc get c:\pic\summer }
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard