Announcement

Collapse
No announcement yet.

Automate downloading of file from the internet

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automate downloading of file from the internet

    Hi,

    I'm looking for a script that can be run via tasks, that will download files from a URL - actually the following locations:
    http://go.microsoft.com/fwlink/?Link...42&clcid=0x409
    and
    http://go.microsoft.com/fwlink/?Link...41&clcid=0x409
    and save the files on a network drive

    Thanks!

  • #2
    Re: Automate downloading of file from the internet

    google for Wget for windows... This will help you out
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: Automate downloading of file from the internet

      Originally posted by Dumber View Post
      google for Wget for windows... This will help you out
      Thanks, this might help although it involves installing wget on the machine

      Comment


      • #4
        Re: Automate downloading of file from the internet

        Well installing.. just a copy of the file... no setups or what so ever needed
        http://pages.interlog.com/~tcharron/wgetwin.html

        AFAIK, Microsoft doesn't have such utilities out of the box.
        Last edited by Dumber; 8th February 2010, 13:38.
        Marcel
        Technical Consultant
        Netherlands
        http://www.phetios.com
        http://blog.nessus.nl

        MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
        "No matter how secure, there is always the human factor."

        "Enjoy life today, tomorrow may never come."
        "If you're going through hell, keep going. ~Winston Churchill"

        Comment


        • #5
          Re: Automate downloading of file from the internet

          Originally posted by XtaZee View Post
          Thanks, this might help although it involves installing wget on the machine
          I Agree with Marcel, wget.exe standalone is a tool that doesn't need to be installed. Save a copy on a share if you like to use it on multiple computers (unblock the downloaded file and be sure the UNCs is included in the Local Intranet Zone). The tool works perfectly.

          However there are three real vbscript functions that I know of for downloading files, I never had much succes with any of them. One didn't work on my computer the other was very very slow and the third script kep being quarantied by my AV program all the time. That is why I prefere to use wget.exe.

          vbscript, invokes wget:
          Code:
          '# http://wget.addictivecode.org/FrequentlyAskedQuestions
          ' GNU Wget is a free Command Line tool for retrieving
          ' files using HTTP, HTTPS and FTP
          ' Download Wget.exe - remove the zone.identifier from (unblock) the
          ' file. Store Wget.exe in the same folder as this script.
          
          ' Downloading my file(s):
          strURL1 = "http://go.microsoft.com/fwlink/?LinkID=87342&clcid=0x409"
          strURL2 = "http://go.microsoft.com/fwlink/?LinkID=87341&clcid=0x409"
          
          downloadFolder1 = "D:\downloadtest"
          
          ' ----------------------------------------------------------------------
          
          scriptPath = WScript.ScriptFullName & "\.."
          
          cmdln1 = """" & scriptPath & "\wget.exe"" """ & strURL1 & """"
          cmdln1 = "PushD """ & downloadFolder1 & """ &&" & cmdln1 & " &PopD"
          
          cmdln2 = """" & scriptPath & "\wget.exe"" """ & strURL2 & """"
          cmdln2 = "PushD """ & downloadFolder1 & """ &&" & cmdln2 & " &PopD"
          
          Set WshShell = CreateObject("Wscript.Shell")
          
          cmdln = "cmd.exe /c " & cmdln1
          rCd = WshShell.RUN(cmdln, 0, False)
          
          cmdln = "cmd.exe /c " & cmdln2
          rCd = WshShell.RUN(cmdln, 0, False)
          \Rems
          Last edited by Rems; 8th February 2010, 15:43.

          This posting is provided "AS IS" with no warranties, and confers no rights.

          __________________

          ** Remember to give credit where credit's due **
          and leave Reputation Points for meaningful posts

          Comment


          • #6
            Re: Automate downloading of file from the internet

            Use Powershell and enjoy the .Net framework goodness. Here are two reasonable solutions.

            -vP

            Comment

            Working...
            X