Format of Directory Listing - WeOnlyDo Discussion board

Format of Directory Listing (General questions)

by Jan, Wednesday, February 16, 2005, 10:37 (7031 days ago)

Hello,
I list an ftp directory and wonder why
sometimes is the first item
an dir item and sometimes total ... .
The format is different from Server to Server.
Is there any other method to get a directory list (file list)?

pFtpCom->ListDir(bstrRemotePath);
pFtpCom->get_ListItem (&bstrList);
_bstr_t lst = bstrList;
LPWSTR wlst = lst;
wprintf (L s , wlst);

case 1:
02-14-05 01:27PM 12354 file.rar

case 2:
total 34
-rwxrwxr-x 1 10490 100 8400 Nov 21 23:25 app.exe
-rwxrwxr-x 1 10490 100 5120 Mar 18 2001 file.txt

Thanks

Jan

[:wink:]

Re: Format of Directory Listing

by wodSupport, Wednesday, February 16, 2005, 12:51 (7031 days ago) @ Jan

Jan,

this depends purely on the server. Some of them sends 'total' line at the beginning, some don't. wodFtpDLX doesn't interfere with this.

But... Why don't you use DirItems collection which already parses these listings?

Re: Format of Directory Listing

by Jan, Wednesday, February 16, 2005, 14:03 (7031 days ago) @ wodSupport

DirItems collection already parses these listings

Good idea!

Thanks
Jan

[:happy:]

Re: Format of Directory Listing

by fuzzybit, Wednesday, September 28, 2005, 16:48 (6807 days ago) @ Jan

Jan,

this depends purely on the server. Some of them sends 'total' line at the beginning, some don't. wodFtpDLX doesn't interfere with this.

But... Why don't you use DirItems collection which already parses these listings?

Oh! I realize now that DirItem Object & DirItems Collections are in the help file, but maybe you can add a link to them under ListDir method, just for those of us that never read carefully :D

Great component!