简体   繁体   中英

cURL- listing FTP directory contents, or downloading the entire directory

Using CURL and connecting by FTP, how do I list the contents of a remote directory? Instead of downloading a single file individually and having to know the filename, I have a requirement to download the whole remote directory (which will just be a bunch of text files).

Is there any way using FTP with cURL to either:

  1. Download all files in a directory
  2. List all files in a directory, so I can iterate over these and download.

If you don't have to use cURL, try this guy. . It looks like this closer to what you are looking for!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM