Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I download the files from about 400 urls (without doing them individually)

Posted on 2016-08-11
11
84 Views
Last Modified: 2016-08-15
Have a text file of URLs. How do I download them all automatically? Thank you :-)
MSFTFreeEbooks.txt
0
Comment
Question by:agwalsh
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 3

Assisted Solution

by:Ganga Sagar
Ganga Sagar earned 83 total points
ID: 41751843
you can use batch for the same.

download the attached txt file and rename it with .bat extension and run. i hope it will work for you.
0
 

Author Comment

by:agwalsh
ID: 41751854
Rename my file MSFTFreeEbooks.txt to MSFTFreeEbooks.bat and then run it? Because if you have attached a file - can't see it :-0. Thanks though
0
 
LVL 12

Assisted Solution

by:Benjamin Voglar
Benjamin Voglar earned 83 total points
ID: 41751857
Hi. Here is you script:

Use poweshell ISE. Paste the code and edit the path's:

Get-Content "c:\it\powershell\urls.txt" | Foreach {
    Start-Job {
        function Save-TinyUrlFile
        {
            PARAM (
                $TinyUrl,
                $DestinationFolder
            )

            $response = Invoke-WebRequest -Uri $TinyUrl
            $filename = [System.IO.Path]::GetFileName($response.BaseResponse.ResponseUri.OriginalString)
            $filepath = [System.IO.Path]::Combine($DestinationFolder, $filename)
            try
            {
                $filestream = [System.IO.File]::Create($filepath)
                $response.RawContentStream.WriteTo($filestream)
                $filestream.Close()
            }
            finally
            {
                if ($filestream)
                {
                    $filestream.Dispose();
                }
            }
        }

        Save-TinyUrlFile -TinyUrl $args[0] -DestinationFolder $args[1]
    } -ArgumentList $_, "c:\t"
}

Open in new window

0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 3

Assisted Solution

by:Ganga Sagar
Ganga Sagar earned 83 total points
ID: 41751861
sorry , here is the file. rename it with .bat extension.

or if you have IDM then you can make batch file for the same . like
C:\Program Files (x86)\Internet Download Manager>IDMan.exe /d url
download.txt
0
 
LVL 5

Assisted Solution

by:Jambon316
Jambon316 earned 251 total points
ID: 41751982
LOL go back to the page got that where you got that text file...scroll down through comments...there's a bunch of scripts you can copy and paste powershell or bash or if you really need to download a gui based application, flashget , downthemall , there's also a load of chrome extensions that will do it ... but really, if you had read that page all the way to the bottom, you would have answered this yourself...
0
 
LVL 5

Accepted Solution

by:
Jambon316 earned 251 total points
ID: 41752021
literally this was one comment on that page:

1) Save the list of the book locations provided by Eric Ligman (many thanks Eric!) in a file (default msftebooks.txt) by right clicking the icon he provided in the article and use the 'Save' dialog.

2) Download (the free) Wget.exe v1.11.4 (google it) [Warning: Later versions are not compiled correctly for Windows].

3) Place both files in same directory (it was happy with general Download folder but you might prefer them to be in a New Folder e.g. Microsoft eBooks; the downloaded files will also be in that directory folder).

4) Open Command Prompt and use 'cd' command (without the quote marks) to move the prompt to the location of the files.

5) Type wget -i mstfebooks.txt
0
 
LVL 29

Assisted Solution

by:serialband
serialband earned 83 total points
ID: 41752699
If you're going to cut and paste instructions from the site, you should also quote the content and provide the link. https://blogs.msdn.microsoft.com/mssmallbiz/2016/07/10/how-to-download-all-of-the-free-ebooks-and-resources-in-my-free-ebooks-giveaway/
0
 
LVL 5

Assisted Solution

by:Jambon316
Jambon316 earned 251 total points
ID: 41753353
I did that. the page I copied and pasted from was the same page that the poster obtained the text file from.
so he already had the link...my point was that a really easy solution was already there on the same page
0
 
LVL 29

Expert Comment

by:serialband
ID: 41753379
I meant to post it for everyone else, so they don't have to search for it.
0
 

Author Comment

by:agwalsh
ID: 41755981
Thanks to all of you but what I ended up doing was getting someone on Fiverr to do it. :-) Much appreciated though.
0
 

Author Closing Comment

by:agwalsh
ID: 41755982
Got lots of help and suggestions but ended up outsourcing it :-)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to write the DCDIAG powershell 8 31
Start-VM 3 18
Need help Creating PowerShell Script 5 52
Exchange 2013 Admin Center Issue 3 17
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
A brief introduction to what I consider to be the best editor for PowerShell.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

792 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