Hello,
I have a script that will ftp into a server, download the files from a designated folder, and then delete the files from the FTP server. Problem is, i want the script to only delete the files that were copied, because there is a possibility of deleting files that were not copied.
Here is a snippet of the code:
cname="company name"
FTPX.LocalFolder = "d:\users\" & cname & "\incoming"
LOCALDIR = FTPX.LOCALFOLDER
FTPX.Download "/userdata/" & cname & "/INCOMING/*.*", LOCALDIR
FTPX.RemoteRemove "/userdata/" & cname & "/incoming/*.*"
I don't know how many files there will be or the names of the files beforehand. Is there anyway to copy the files from the FTP Server to the local server, verify the files were copied to the local server, and delete only the files that were verified on the FTP server?
Thanks for any insight.
Cantina
I have a script that will ftp into a server, download the files from a designated folder, and then delete the files from the FTP server. Problem is, i want the script to only delete the files that were copied, because there is a possibility of deleting files that were not copied.
Here is a snippet of the code:
cname="company name"
FTPX.LocalFolder = "d:\users\" & cname & "\incoming"
LOCALDIR = FTPX.LOCALFOLDER
FTPX.Download "/userdata/" & cname & "/INCOMING/*.*", LOCALDIR
FTPX.RemoteRemove "/userdata/" & cname & "/incoming/*.*"
I don't know how many files there will be or the names of the files beforehand. Is there anyway to copy the files from the FTP Server to the local server, verify the files were copied to the local server, and delete only the files that were verified on the FTP server?
Thanks for any insight.
Cantina