Need a script to automatically save pdf instead of displaying in IE.

I need this script because I have to save hundreds of pdf's from the web.  What makes it even more time consuming is a lot have the same name just in a different directory.  It doesn't seem to complicated, but I do not know windows.  So here is what I need: When IE tries to load a pdf, instead of associating it with acrobat, I want it to send to a batch file that will automatically save it to a directory.  In addition I want the name of the pdf to include the last directory name, for example: ../project1/1.pdf to be saved as project1 - 1.pdf.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi CptanPanic  I donot have a clue how to do this my curiosity got the better of me just wanted to ask why 100's of PDF off web pages./ from the WEB pages??
Why 100"s??  What are you doing?

CptanPanicAuthor Commented:
I need to download all the service pdf's for a vehicle, to make a single pdf locally.
ZvonkoSystems architectCommented:
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Hi CptanPanic,

Look at URL2file.exe here:

If you know the directory and filenames, you can then build a pair of batch files which will save files directly from the web to your harddrive in windows.  The batch file could look like this:

:: GetList.BAT - get list of files
CD "\My Documents\MyProject\Vehicle1"
CALL getFile dir1 file1.pdf
CALL getFile dir2 file1.pdf
CALL getFile dir2 file2.pdf
CALL getFile dir3 file1.pdf
:: end of GetList.BAT

:: getFile.BAT - use URL2file.exe to get files from web to similar dir on harddrive
URL2file "" %1\%2
:: end of GetFile.BAT

Note the forward slash and backslash directory delimiters (web vs. Windows).  That's why we used two command-line parameters for dir and file separately.

Peace and joy.  mvan

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sorry, to follow your example exactly, your getFile.BAT would be:

URL2file "" "%1 - %2"

I guess that's another reason to separate the last dir and the filename as individual parameters.  :-)  You can make your GetList.BAT file as long as you wish (as many files as you have the patience to download at one time).

Peace and joy.  mvan
I know that my solution for CptanPanic works.  I use it weekly.  Peace and joy.  mvan
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.