0

Hi

I am developing FTP Clinet application that downloads files from the specified server
i sent the LIST command and server returned a list of file names in following order:

-rw-r--r-- 1 devubas devubas 24 Sep 5 2008 .bash_logout

now the problem is how do i extract the filename fom above string for example just the .bash_logout.

Is there any way to just get the filename from FTP server by sending this command combined with other parameters.

Please help

Edited by nccsbim071: n/a

3
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by nccsbim071
1

Perhaps use the NLST command instead?
You could also use methods from the string class like SubString, Length etc.
You could use the string Split method and split on a space character. The last string will be the filename.
You could use a Regex expression.
Hope this helps.

0

Be sure you watch out for spaces in filenames. They are valid and it may break your parser depending on how it is implemented.

0

thank you sknake and ddanbe, for your replies.

using NLST gives the names only

the problem is solved.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.