Board index » delphi » TidFtp.list: not only files but directory infos wanted

TidFtp.list: not only files but directory infos wanted

Hi,

is it possible to get information about the directories on the ftp
server.

if i say

   ftp.list( remotelist, '*.*', false )

i only get a list of files, but not of directories. I need the directory
information because i want to
do a copy including subdirectories.

Any suggestions?

Thank
Stefan

 

Re:TidFtp.list: not only files but directory infos wanted


Try this one

   ftp.list( remotelist, '', false )

Doychin

Quote
"Stefan Kilp" <k...@sk-software.de> wrote in message

news:3A0BE075.33790FC5@sk-software.de...
Quote
> Hi,

> is it possible to get information about the directories on the ftp
> server.

> if i say

>    ftp.list( remotelist, '*.*', false )

> i only get a list of files, but not of directories. I need the directory
> information because i want to
> do a copy including subdirectories.

> Any suggestions?

> Thank
> Stefan

Re:TidFtp.list: not only files but directory infos wanted


Doychin Bondzhev schrieb:

Quote
> Try this one

>    ftp.list( remotelist, '', false )

ob but i can'd distingusih between directories and files. would it be possible
to add a / (slash)
to the directoryname or a special sign to indentify directorynames, and the
first entry is something like
"total 12"

if i use ftp.list( remotelist, '*', false) then every directory is followed by
a colume (:), but also all files
are show recursivly ???

Quote

> Doychin

> "Stefan Kilp" <k...@sk-software.de> wrote in message
> news:3A0BE075.33790FC5@sk-software.de...
> > Hi,

> > is it possible to get information about the directories on the ftp
> > server.

> > if i say

> >    ftp.list( remotelist, '*.*', false )

> > i only get a list of files, but not of directories. I need the directory
> > information because i want to
> > do a copy including subdirectories.

> > Any suggestions?

> > Thank
> > Stefan

Re:TidFtp.list: not only files but directory infos wanted


Sorry .
Try this one:

ftp.list( remotelist, '', true)

You will have a list of strings that will begin with 'd' when this line
represents directory or anything else in the case of file.
This is for UNIX directory listings.
If you have DOS listing then you have to identify directories by the '<DIR>'
substring on the lines.

Doychin

Quote
"Stefan Kilp" <k...@sk-software.de> wrote in message

news:3A0C4076.7C4B48A9@sk-software.de...
Quote

> Doychin Bondzhev schrieb:

> > Try this one

> >    ftp.list( remotelist, '', false )

> ob but i can'd distingusih between directories and files. would it be
possible
> to add a / (slash)
> to the directoryname or a special sign to indentify directorynames, and
the
> first entry is something like
> "total 12"

> if i use ftp.list( remotelist, '*', false) then every directory is
followed by
> a colume (:), but also all files
> are show recursivly ???

> > Doychin

> > "Stefan Kilp" <k...@sk-software.de> wrote in message
> > news:3A0BE075.33790FC5@sk-software.de...
> > > Hi,

> > > is it possible to get information about the directories on the ftp
> > > server.

> > > if i say

> > >    ftp.list( remotelist, '*.*', false )

> > > i only get a list of files, but not of directories. I need the
directory
> > > information because i want to
> > > do a copy including subdirectories.

> > > Any suggestions?

> > > Thank
> > > Stefan

Other Threads