I abandoned the "move" command temporarily and tried using the rename udf. I think I still have the same problem, but I don't understand why. I get the first file renamed and the rest are ignored.

 Code:
$path="c:\admin\foo"
$archive="c:\admin\archive"

$date=@DATE
$time=@TIME
$modtime=Join(Split($time,":"),"")
$moddate=Join(Split($date,"/"),"")
$filename=@wksta+"_prod_"+$moddate+"_"+$modtime+"_foolog_0000.csv"


$Dir = dirscan($path,1)
For Each $file in $dir
  If InStr($file,"-")
	rename($path,$file,$filename)
  EndIf
Next
_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs.
-Mark Twain