仅列出文件和一个FTP服务器使用C#的最后修改日期日期、服务器、文件、FTP

2023-09-06 08:42:55 作者:black berry[黑莓]

我试图解析Ftp.ListDirectoryDe​​tails命令的结果,我想只是文件名和最后修改日期而不是目录。

I'm trying to parse the result of the Ftp.ListDirectoryDetails command, I want just the FileName and the last modification date Not Directories.

该命令返回的:

09年1月21日下午6点16分rattandom 09年1月21日下午8点01分9900 myfile.txt的

"01-21-09 06:16PM rattandom" "01-21-09 08:01PM 9900 myfile.txt"

是否有人知道解析它的方式吗?我读,如果服务器是Windows或Unix将返回不同的东西。我贴的结果是在Windows 2003服务器的FTP

Does somebody know the way to parse it? I was reading and if the server is Windows or Unix it will return something different. The result that I paste is for an FTP in a Windows 2003 Server

推荐答案

FTP列表的结果是非标准所以每一个FTP服务器可能会返回不同的东西。

FTP list results are non-standard so every FTP server could potentially return something different.

 
精彩推荐
图片推荐