Create script to copy *.pdf file from IE Link to Computer

Posted on 2007-09-28
Last Modified: 2010-04-16
I have a link :

I would like to create a script or batch file that will copy this pdf file to a location on my pc.
Question by:msammis
    LVL 63

    Expert Comment

    Use auto-it the free scripting tool to do this.

    auto-it Free scripting tool, keyboard macros  and compiled exe files

    I hope this helps !
    LVL 9

    Accepted Solution

    there a variety of tools you can use beside autoit
    1) wget for windows :
    depending on what you want, it could be as simple as
       c:\> wget
    2) curl for windows:
       simple usage: c:\> curl
       check for more info

    3) if you can use Python. you can use the urllib2 module

    import urllib2
    url = ""

    4) or you can use vbscript

        strFileURL = ""
        strHDLocation = "c:\file.pdf"
        Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")    "GET", strFileURL, false
        If objXMLHTTP.Status = 200 Then
          Set objADOStream = CreateObject("ADODB.Stream")
          objADOStream.Type = 1 'adTypeBinary
          objADOStream.Write objXMLHTTP.ResponseBody
          objADOStream.Position = 0    'Set the stream position to the start
          Set objFSO = Createobject("Scripting.FileSystemObject")
            If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
          Set objFSO = Nothing
          objADOStream.SaveToFile strHDLocation
          Set objADOStream = Nothing
        End if
       Set objXMLHTTP = Nothing
    save as downloadFile.vbs and on command prompt: cscript /nologo downloadFile.vbs

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now