well..
what is the problem you have?

anyways, you should change this:
ReDirectOutput ("M:\Inventory\@WKSTA.txt",1)

to:
$nul= ReDirectOutput ("M:\Inventory\"+@WKSTA+".txt",1)

for certainty.
vars and macro's inside strings are risky...
_________________________
!

download KiXnet