Até fui confirmar a data do post do Itamar....Itamar M. Lins Jr. escreveu:Procurou os comandos FTP ?
Pq neste caso precisa entrar e sair(dentro e fora) da concha(SHELL) FTP.
https://www.cs.colostate.edu/helpdocs/ftp.html
O comando ls deve resolver seu caso.
ls to list the names of the files in the current remote directory
Faz 15 anos (QUINZE ANOS) que o Harbour faz isso, e o Itamar sugerindo complicações...
Em todo caso, no passado criei isto, que não uso mais.
Como não apaguei a anotação do fonte, não sei se precisa no 3.2.
Código: Selecionar todos
/*
CREATE CLASS MyTIPClientFTP INHERIT TIPClientFTP
METHOD ListFiles( cFileSpec )
ENDCLASS
METHOD ListFiles( cFileSpec ) CLASS MyTIPCLientFTP
LOCAL aList, aFile, cEntry, aListFiles := {}
LOCAL cYear, cMonth, cDay, cTime, cName, cSize, cAttrib, cList, nCont
cList := ::list( cFileSpec )
IF Empty( cList )
RETURN aListFiles
ENDIF
aList := hb_ATokens( StrTran( cList, Chr( 13 ) ), Chr( 10 ) )
FOR nCont = 1 TO Len( aList )
cEntry := aList[ nCont ] // 05-03-13 06:18PM 2115072 jpa.exe
IF ! Empty( cEntry )
aFile := Array( 5 )
cEntry := AllTrim( cEntry )
cDay := Substr( cEntry, 1, 2 )
cMonth := Substr( cEntry, 4, 2 )
cYear := "20" + Substr( cEntry, 7, 2 )
cEntry := AllTrim( Substr( cEntry, At( " ", cEntry ) ) )
cTime := AllTrim( Substr( cEntry, 1, At( " ", cEntry ) ) )
cEntry := AllTrim( Substr( cEntry, At( " ", cEntry ) ) )
cSize := AllTrim( Substr( cEntry, 1, At( " ", cEntry ) ) )
cEntry := AllTrim( Substr( cEntry, At( " ", cEntry ) ) )
cName := cEntry
cAttrib := ""
aFile[ F_NAME ] := cName
aFile[ F_SIZE ] := Val( cSize )
aFile[ F_ATTR ] := cAttrib
aFile[ F_DATE ] := hb_SToD( cYear + cMonth + cDay )
aFile[ F_TIME ] := cTime
Aadd( aListFiles, aFile )
ENDIF
NEXT
RETURN aListFiles
*/


