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

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.

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

thank you sknake and ddanbe, for your replies.

using NLST gives the names only

the problem is solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.