I am attempting to create a dynamic list of files available in an ftp directory. I assume wget
can help with this but I'm not really sure how...so my question is:
What is the syntax for retrieving file names from an ftp directory using wget
?
dir -R = Lists all files in current directory and sub directories. dir -S = Lists files in bare format in alphabetic order. Exits from FTP. Get file from the remote computer.
Wget is a computer tool created by the GNU Project. You can use it to retrieve content and files from various web servers. The name is a combination of World Wide Web and the word get. It supports downloads via FTP, SFTP, HTTP, and HTTPS.
Just execute
wget --no-remove-listing ftp://myftpserver/ftpdirectory/
This will generate two files: .listing
(this is what you are looking for) and index.html
which is the html version of the listing file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With