Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Files from FTP are not deleted always
Message
 
To
09/01/2006 04:56:24
Raoshan Kumar
Softinfo Systems Pvt. Ltd.
New Delhi, India
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01084634
Message ID:
01084835
Views:
14
I had a similar project years ago - my projecthad to log-in (user id and pw). I used the ITC - but if I were to do it again I would use Michel Fournier's DLL solution (UT mag 2001).

I looked at my code - since my project was logged to the server - I did not use the "cPath" argument, just the file name (it's the "value" of a selected ListBox item). Here is my code - it was not inside an error loop - it just ran, "in line" without expecting an error:
exe_str=[,"DELETE ]+alltrim(thisform.RemoteDIR.Value)+["]
ThisForm.IC.Execute(&exe_str)
do while thisform.IC.StillExecuting
enddo
I used that object - but never to delete a "server"

>Hi All
>
>I'm using MSINET.OCX (Microsoft Internet Transfer Control) for interacting with a private FTP site (uploading, downloading & deleting). All is fine, but at the time of deleting a file from site, sometimes it does not get deleted and the form has gone in an endless loop.
>
>The code for deletion of file from FTP site is hereunder:
>
>
>	WITH .oleFTP
>		.RemoteHost = cFTPSite
>		.Protocol = 2  && icFTP
>		.UserName = cUserName
>		.Password = cPassword
>		>		cOldError = ON("ERROR")
>		ON ERROR frmFtpXfer.ErrorMethod()
>
>		.Execute(, [SIZE ]+ cFtpPath + cFileName )
>		DO WHILE .StillExecuting
>		ENDDO
>
>		nSize = VAL( .GetChunk( 1024 ) )
>		IF nSize > 0
>			.Execute(, [DELETE ]+ cFtpPath + cFileName )
>		ELSE
>			Thisform.nStateNo = 0
>		ENDIF
>
>		ON ERROR &cOldError
>	ENDWITH
>
>
>
>Please help me to find a way out of this problem.
>There is 50-50 chance of deletion of the file.
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform