Quote:


I tested your script. The IF @ERROR sections seem to simply re-set the $rc variable to the new value you have (Writeline etc etc).
....





Nope the $rc gets set by WriteLine. It will be 0 if writeline works.

Quote:


....
All my error files were coming in empty. They'd get created, but there was no text in them. I rewrote the script again, using the direct mappings as you have them, but calling the original ERRLOG subroutine which I know works.





An error file gets created by the 5 option when I open the file. 5 is the sum of 1 create if file does not exists) and 4 open for writing. There is a bug in my code because writeline will also set @error Sorry for that.
If you put these lines just after each use command it should show something on the screen. Can you tell us what you see on the screen? All writeline lines can be removed.

Code:

?@error
?@serror
Sleep 2

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.