![]() ![]() Or use an FTP client that has API for it.įor example with my WinSCP. If your server does not support the -R switch, you have to implement recursion yourself. So to make sure LIST -R is used, you need to use both FtpListOption.Recursive and FtpListOption.ForceList. Though note that FluentFTP uses -R with LIST only, while it prefers using MLSD, if the server supports it. FluentFTP supports that too ( FtpListOption.Recursive). Some FTP servers (like ProFTPD) do support a non-standard proprietary -R switch to the LIST command that will make them return listing across all subfolders. Otherwise it falls back to LIST and tries to parse the listing. Internally it uses MLSD, if supported by the server. So you do not have to use FtpClient.GetFileSize and FtpClient.GetModifiedTime per file. It's particularly not supported by *nix vsftpd and Windows IIS. ![]() ![]() MLSD to retrieve directory listing, including file attributes in machine readable format – This command is least supported.Though most servers will support *nix style listing (like *nix ls command). LIST to retrieve directory listing, including file attributes – Supported by all servers, but the listing is not standardized and thus not really machine-readable.SIZE and MDTM to retrieve size and modification file of certain file – Supported by virtually all servers.NLST to retrieve names of files in certain directory – Supported by all servers.FTP offers these commands to retrieve an information about remote files: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |