Yes, that works, but it's hard to tell later which IF statements should be removed unless you use the $DEBUG form.

You KNOW that all the GOTOs have to perform a "GOTO bit-bucket"! [Big Grin]

I actually use a Cmd() UDF to execute external commands in this fashion. If $DEBUG is true (a global var) then the command is displayed instead of executed. The display is via a MSG() UDF, which either writes to the screen, or to a log file if $_LOGFILE (also a global) is defined.

I still use GOTOs for simple and temporary detours.

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