You could also use $file(filename) as well. It will return $null if it is not found or 0 if the file is empty. You could even test for both conditions if you wanted to. smile
Code:

on *:TEXT:!exists*:#:{
  if ($file($+(",$mircdir,$$2-,.txt")) == $null) msg $chan $2 was not found.
  elseif ($file($+(",$mircdir,$2,.txt")) == 0) msg $chan $2 was found, but it's an empty file.
  else msg $chan $2 was found!
}

You could also use:

msg $chan $findfile(C:\,$+(",$2-,.txt"),0,msg $chan $nopath($1-) was found in $nofile($1-)) matches found for $2-

but that's getting a little out of hand, don't you agree? smirk


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C