mIRC Homepage
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
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.
That should work fine too, thanks for the help RusselB !
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 }
}
© mIRC Discussion Forums