code:
SHELL '%COMSPEC% /c /e:1024 dir /w >%TEMP%\test.txt'

Make sure you have the correct permisssions if really have to write into the root directory of Windows NT/2000/XP
_________________________
There are two types of vessels, submarines and targets.