 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
N. Karademir Guest
|
Posted: Wed Apr 21, 2004 2:48 pm Post subject: findfrist in a ftp directory |
|
|
i have to search a ftp directory for a file with extension *.ABC
on a localmap i would do this:
void GetFile()
{
TSearchRec FileInfo;
if( FindFirst( "c:\temp\*.abc", faDirectory, FileInfo) ==0 )
{
do
{
// file found
}
while( FindNext(FileInfo) == 0 );
FindClose(FileInfo);
}
}
on ftp drive i try this:
void GetFile()
{
TSearchRec FileInfo;
if( FindFirst( "ftp.myftpsite/cust/shoq1/*.abc", faDirectory,
FileInfo) ==0 )
{
do
{
// file found
}
while( FindNext(FileInfo) == 0 );
FindClose(FileInfo);
}
}
this does not work.
can someone tell me how to do this?
mvg
--
Smart Software
N. Karademir
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Apr 21, 2004 5:11 pm Post subject: Re: findfrist in a ftp directory |
|
|
"N. Karademir" <n.karademir (AT) smart-software (DOT) org> wrote
| Quote: | on ftp drive i try this:
|
You can't use FindFirst() with FTP. You need to use the actual FTP protocol
instead. Either use an existing FTP component, such as the one included in
Indy (http://www.indyproject.org) or ICS (http://www.overbyte.be) or any
other third-party FTP component, or use the WinInet API which has
FTP-related functions in it.
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|