Skip to content Skip to sidebar Skip to footer

Python: How To Get List Of File And Use Wildcard In Ftp Directory?

I'm new to python. I want to access baseURL and eventually get a list of files in one of the sub-directories so I can download/unzip this file. The specific file extension can chan

Solution 1:

You could use Python ftplib, https://docs.python.org/3/library/ftplib.html, as a ftp client. I don't think wildcard downloads are support, so you'd have to do something along the lines of...

  1. Login to the FTP server
  2. Navigate to the desired directory
  3. Get a listing of the files, iterate thorough the files and match according to the desired file format
  4. Download desired files

Post a Comment for "Python: How To Get List Of File And Use Wildcard In Ftp Directory?"