Board index » cppbuilder » findfrist in a ftp directory

findfrist in a ftp directory


2004-04-21 10:48:57 PM
cppbuilder83
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
 
 

Re:findfrist in a ftp directory

"N. Karademir" < XXXX@XXXXX.COM >wrote in message
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 (www.indyproject.org) or ICS (www.overbyte.be) or any
other third-party FTP component, or use the WinInet API which has
FTP-related functions in it.
Gambit