Brad,

Thanks for the tip. At first it didn't work but then I reversed the quotes, ie:

SHELL 'SETW.EXE -D OUTPUT="$SCAN_PN"'

And it's perfect now!!

Thanks

Ivan