简体   繁体   English

WGET 仅获取 FTP 目录中的文件名

[英]WGET only the file names in an FTP directory

I am attempting to create a dynamic list of files available in an ftp directory.我正在尝试创建 ftp 目录中可用文件的动态列表。 I assume wget can help with this but I'm not really sure how...so my question is:我认为wget可以帮助解决这个问题,但我不确定如何......所以我的问题是:

What is the syntax for retrieving file names from an ftp directory using wget ?使用wget从 ftp 目录检索文件名的语法是什么?

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.这将生成两个文件: .listing (这是您要查找的文件)和index.html ,它是列表文件的 html 版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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