Looking for command line ftp client (linux) -


i looking batch download large number of files (>800). have text file list of filenames. these filenames used derive url can downloaded. had been parsing through file python script, using subprocess wget files.

wget ftp://ftp.name.of.site/filename-prefix/filename/filename+suffix 

however reasons unknown me, wget failing connect. wanted know if use ftp program work in similar manner, i.e. no login , stay within commandline.

edit: what's in text file:

ers032033 ers032214 ers032234 ers032223 ers032218 

the ers### act prefix. whole thing filename. final file (i.e. filename+suffix) like: ers032033_1.fastq.gz

submitting correct url not problem.

since using python, suggest dropping subprocess approach , using urllib module instead:

import urllib handle = urllib.urlopen('ftp://ftp.name.of.site/filename-prefix/filename/filename+suffix') print handle.read() handle.close() 

assuming using python 2 (urllib.request python 3)

if need batch download, urllib.urlretrieve cleaner approach.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -