WGET only the file names in an FTP directory
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 sy开发者_运维百科ntax for retrieving file names from an ftp directory using wget
?
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.
精彩评论