How to download files in a list of URLs

By | May 5, 2016

CURL is a useful command line tool to script some tasks. One of the common tasks is to download a list of files from some URL locations.

For example, there is a list of files as below.

If the file names are a sequence of alphanumeric series, the following command can be used.

How about if the file names are kind of random.

If the list is short, the following command can be used.

If the list is long, the above command is not practical. In this situation OS command can come to help. The list of URLs can be stored in a text file named urls.txt.

On Windows, use the following command to loop through all URLs.

Leave a Reply

Your email address will not be published. Required fields are marked *