If you later plan on parsing the output file with Kix, you might want to look at WshPipe(), which runs a command and collects the output into a Kix variable.

The version posted here combines STDOUT and STDERR output streams, just as you'd see on the screeen. I have a modified version on my web site that returns a two element array - one for STDOUT and one for STDERR - making things a bit easier to process.

Either UDF eliminates the SHELL command and the need to open/read/parse the data in the file you collected. Same command syntax, but without the final redirection.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D