You get that because the alias is returning a null value.

If that is the exact code you are using, I suggest you change the line
Code:
      return returnv
to return the variable:
Code:
      return %returnv
Note the % sign in the second.
Does that work?

Additionally you can probably do it much more easily by using $findfile, with N = 0 to return the number
Code:
$findfile(dir,wildcard,N,depth,@window | command)
so you need soemthing like
Code:
 $findfile($scriptdir,name*.txt,0)
should return the number of name*.txt files in the path to your script.

Last edited by Aenei; 23/12/05 09:12 PM.