Solomon
Solomon

Reputation: 1

FTP Urls Batch download with Python

Please Someone should help me. I want to download files from numerous ftp links using PYTHON and typing them out wont be easy beacuse they are more than these

ftp://data-out.unavco.org/pub/rinex/obs/2015/001/adis0010.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/002/adis0020.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/003/adis0030.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/004/adis0040.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/005/adis0050.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/006/adis0060.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/007/adis0070.15d.Z
ftp://data-out.unavco.org/pub/rinex/obs/2015/008/adis0080.15d.Z

Upvotes: 0

Views: 67

Answers (1)

Ricardo Bohner
Ricardo Bohner

Reputation: 365

You can use batch script in combination with curl. Curl command already ships with windows 10 but if you have an older version you can still download curl.

Let's say the links are stored on a file called "Downloads.txt":

You open notepad and save the following code in it:

@echo off
for /f "delims=" %%a in (downloads.txt) do curl -O "%%~a"

Save the file with an extension of *.bat

Upvotes: 1

Related Questions