0

I'm trying to grab and download all of the following files: https://ftp.ensembl.org/pub/current_fasta/*/dna/*.dna.toplevel.fa.gz

I tried adapting the following code: https://www.geeksforgeeks.org/how-to-list-all-files-and-directories-in-ftp-server-using-python/

from ftplib import FTP
ftp = FTP("ftp.ensembl.org")
ftp.login()
ftp.cwd("pub/current_fasta")

That's as far as I've gotten. I can't figure out how to glob or download the files.

Any help would be greatly appreciated.

O.rka
  • 29,847
  • 68
  • 194
  • 309

0 Answers0