set OUTPUT_FILE=coor-diag
...
if not %OUTPUT_MODE%==PDF (
set OUTPUT_FILE=%OUTPUT_FILE%.%OUTPUT_MODE%
echo %OUTPUT_FILE%
...
if exist ... (if exist ... (
...))) else (
if ... (if exist ... (if exist ... (
...)))
)
In fact, when OUTPUT_MODE is COPY, the echo statement shows OUTPUT_FILE
is still set to coor-diag, not coor-diag.COPY as one would expect. But
a "SET" command on the DOS shell shows the correct value for OUTPUT_FILE.
Does any one have an explanation for this?
Thanks
I don't believe that you are using MS-DOS, or a DOS shell. This looks
more like the Windows 2000/XP shell CMD.EXE to me. You would be better
served by a group devoted to that environment, like alt.msdos.batch.nt
or microsoft.public.win2000.cmdprompt.admin.
Personally I try to avoid Microsoft's primitive command shells as much
as possible, both in DOS and in their other operating systems. But I
suspect that this is one of those situations where you need to use
CMD.EXE's clumsy 'delayed expansion' feature. How you make it work in
multiply-nested IF statements like that is something I can't help you
with; sorry.
--
Charles Dye ras...@highfiber.com