Hi all,
First of all, sorry for my crappy English, It's my second language.
I am new to this forum and Cuteftp pro.
Anyway, I tried to write a script to download files from a server to my local PC. Filename are variable. How could i verify if files are existing? Below is the codes. Thanks for your help.
Set MySite = CreateObject("CuteFTPPro.TEConnection")
MySite.Protocol = "FTP"
MySite.Host = "xxx.xxx.xxx.xxx"
MySite.Port = 21
MySite.Login = "test"
MySite.Password = "test"
MySite.Connect
R=Mysite.localExists ("/test/from/*.txt")
If ® Then
'msgbox "file exist" 'test if the file exists
MySite.Download "/test/from/gcs*", "c:\data"
Else
'''Msgbox "File doesn't exist1 on client site"
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "xxxx@hotmail.com"
objEmail.To = "xxx.xxx@xxx.com"
objEmail.Subject = "test"
objEmail.Textbody = "test"
objEmail.Send
End if