Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am working in Flash. I want to open a .pdf file from a Flash presentation. Flash has the ability to lauch an app but not a file. I therefore need to use a batch file. I've successfully had Flash launch the batch file and open Acrobat Reader but it fails to open the file in the next line of the batch file.
Here's my script:
@echo off
AcroRd32.exe
1844TZPI.pdfI get a "bad command or file name message"
I don't want to put a drive letter because this is to be delivered on CDROM and the letter may change on different computers.
HELP! I'm no programmer...

David, put the file name which is an argument to the acrobat reader program on to the same line:
AcroRd32.exe 1844TZPI.pdf
You may have to include the fully qualified path to the pdf-file as well, like:
AcroRd32.exe d:\somedir\1844TZPI.pdf

David;
You may never see this post, but for those who browse it may be useful.
In Win9x a lesser-known feature about the DOS environment is its ability to read and load long filenames. So, in the case of the example above you could load the long filename "My recent show.pdf" by adding a double quote (") before the filename:
AcroRd32.exe "d:\somedir\My recent show.pdf
You don't have to close it with a double quote, but it never hurts.
The disadvantage, some might say, is in goofing up the long filename. The advantage is that your command lines are clear and you don't have to bother looking up DOS's 8.3 equivalent. :o)

Bob:
Thanks for your input. The Flash player will be on a CD and it always looks to the level of the drive on which it lies to run the app, that's where I put the .bat, the Reader and the .pdf.
I wanted to stay away from a drive letter because Acrobat Reader and the .pdf file will be delivered on CD. Isn't the CD drive letter sometimes different on people's systems and doesn't this pose a problem?-David

How to Open a PDF passord protected passim the passwor in command line??
like \acrord32.exe c:\tst.pdf /pwd=223344

I had the same kind of problem and I solved it like this:
@ echo off
copy quickdemo.mov c:\quickdemo.mov /y
start quicktimeplayer c:\quickdemo.movecho on
Basically it copies a file to the C drive then you can play it from there and it doesn't matter where the CD drive is. Sorted mate!

![]() |
DOS and Windows Disks
|
win2000 dos command outpu...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |