Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2006-04-08
7
Medium Priority
?
192 Views
Last Modified: 2008-02-01
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.
Thanks,
CP
0
Comment
Question by:CptanPanic
6 Comments
 
LVL 70

Expert Comment

by:Merete
ID: 16410505
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?

0
 

Author Comment

by:CptanPanic
ID: 16411910
I need to download all the service pdf's for a vehicle, to make a single pdf locally.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 16422778
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Accepted Solution

by:
mvan01 earned 1500 total points
ID: 16423393
Hi CptanPanic,

Look at URL2file.exe here:
http://www.chami.com/free/url2file_wincon.html

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
C:
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
@ECHO OFF
URL2file "http://some.domain.com/big/long/directory/%1/%2" %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
0
 
LVL 11

Expert Comment

by:mvan01
ID: 16423424
Sorry, to follow your example exactly, your getFile.BAT would be:

@ECHO OFF
URL2file "http://some.domain.com/big/long/directory/%1/%2" "%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
0
 
LVL 11

Expert Comment

by:mvan01
ID: 16677316
I know that my solution for CptanPanic works.  I use it weekly.  Peace and joy.  mvan
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question