Delete file

Hi,
Thanks for this great library !

I'm wondering how to delete a file in VBScript. The only example I found in the Help file is for C++

I looked into the Shared.vbs file given with the samples but no information about how deleting a file.

Could someone help me ?

Thank you.

Try something like that:

Dim obj

Set obj = CreateObject("sfFTPLib.FTPConnectionSTA")



Dim result



' Settings

obj.Host = "smartftp.com"

obj.Username = "anonymous"

obj.Password = "test@test.com"

obj.Port = 21

obj.Protocol = 0 ' ftpProtocolNormal

obj.Passive = 1

obj.MLST = 1

' Enable logging

obj.LogFile = "Connect.log"



result = obj.Connect()

result = obj.ChangeDirectory("/blbalba")

result = obj.DeleteFile("test.zip")

Thank you !