1.

Solve : bat file - how to ignore window errors?

Answer»

I'm LAUNCHING pdf files within a bat file. I pass the instruction into bat file as a parm. It works great except for when the pdf doesn't EXIST and displays error window. Is there any way to ignore the error and don't display the error window? Is there a way to check if the pdf exist first before launching the pdf?

The bat file has the FOLLOWING code:

@Echo off
start %1
EXIT

The following is the nstruction sent as a parm:

\\USDCAWS37750237\softwares\Temp\PDFs\CBL_2005.pdf

Thanks,
Alex(NEWBIE)

[old attachment deleted by admin]Try using the IF command. Type IF /? at the command prompt.Your suggestion worked indirectly. I entered "IF /?" and it returned an syntax error displaying possible corrections which mentioned "Exist". The combination of "IF EXIST filename START filename" worked.
Thanks for the tip!
Alex



Discussion

No Comment Found