Um, well - you AREN'T catching the return codes from the RedirectOutput() functions! (doh!) \:D

The first return code is actually redirected, so you are only seeing one of them. $RC = RedirectOutput() on both will fix this. If you were redirecting to a file and not NULL, you'd see that.

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