1.

Solve : batch to open pdf files with different pdf viewer?

Answer»

I couldn't get it to not work when I changed the paths to PROGRAMS on my system.

You can remove "START", since it's ABSOLUTELY useless in this context.

Code: [SELECT]if (%1)==() goto bad
if "%~dp1"=="D:\My documents\ebooks catalog\" goto book
goto pdf
:book
C:\Program Files\PDF Annotator\PDFAnnotator.exe %1
exit
:pdf
C:\Program Files\Foxit Software\Foxit Reader.exe %1
exit



try this

if (%1)==() goto bad
if "%~dp1"=="D:\My documents\ebooks catalog\" goto book
goto pdf
:book
"C:\Program Files\PDF Annotator\PDFAnnotator.exe" %1
exit
:pdf
"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe" %1
exitNope, Keeps flashing, Starts, and exits, and starts again.
The only way to get out is to restart my PC.

Thanks guys for your help.
Maybe I am trying to do something impossible.f (%1)==() goto bad
if "%~dp1"=="D:\My documents\ebooks catalog\" goto book
goto pdf
:book
echo ebook %1
pause
exit
:pdf
echo pdf %1
pause
exit

tell me the result of regular pdf and pdf in ebook folder
and no its not immpossipble i got it to work on my computerYep this WORKS perfectly.
Thanks a lot mat123, I appreciate your help and determination.

All the best



Discussion

No Comment Found