Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with FTPDeleteFile
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Divers
Thread ID:
01073556
Message ID:
01073964
Vues:
12
More info on this issue is posted here due to crossposting:

http://www.west-wind.com/wwThreads/default.asp?Thread=1O91383CU&MsgId=1O91383CV

+++ Rick --

>I want to read files from a folder and delete them after. It gives me back the error "Invalid handle" after the FTPDelete (And it doesn't delete the file).
>ANy clue?
>
>I am using wwipstuff.
>
>I am using the following code:
>
>* get the files to the headoffice
>
>DIMENSION laFiles[1,4]
>
>*connect FTP server
>oFTP.FTPConnect(THISFORM.sync_ftp_server,THISFORM.sync_ftp_user,THISFORM.sync_ftp_pass)
>
>*get the files
>lnResult = oFTP.aFTPDir(@laFiles,ALLTRIM(THISFORM.sync_fromheadoffice)+"/*.*")
>FOR x=1 to lnResult
>
>	*---------------------------------------------*
>	* FTP du fichier du  serveur                  *
>	*---------------------------------------------*
>	lResult = oFTP.FTPGetFile(THISFORM.sync_ftp_server,;
>	                          ALLTRIM(THISFORM.sync_fromheadoffice)+"/"+ALLTRIM(laFiles[x,1]),;
>	                          "..\synchro\in\"+ALLTRIM(laFiles[x,1]),1,;
>	                          THISFORM.sync_ftp_user,;
>	                          THISFORM.sync_ftp_pass)
>	
>	IF lResult = 0
>		THISFORM.Scnstatus.Value = "Retreiving "+ALLTRIM(laFiles[x,1])+"..."
>		*
>		lResult = oFTP.FTPDeleteFile(ALLTRIM(THISFORM.sync_fromheadoffice)+"/"+laFiles[x,1])
>		IF lResult != 0
>			THISFORM.Scnstatus.Value = "Failed to delete"
>			WAIT oFTP.cErrorMsg window
>		ENDIF
>	ELSE
>		THISFORM.Scnstatus.Value = "Retreiving "+ALLTRIM(laFiles[x,1])+" (Failed)..."
>		WAIT "STOP2" WINDOW
>		WAIT oFTP.cErrorMsg window
>	ENDIF
>	
>
>	*---------------------------------------------*
>	* Load back the data                          *
>	*---------------------------------------------*
>
>ENDFOR
>
>oFTP.FTPclose()	
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform