Auto upload and delete file after succesful upload

Posted on 2008-10-22
Last Modified: 2013-12-09
I am new to this software Cute FTP and i need to upload a file and then want to delete the local file after successful upload. The same way with downloading the file. I want to delete the file from the remote location if i have succesfully download the file.
Question by:tvae
  • 2
  • 2
LVL 68

Accepted Solution

woolmilkporc earned 125 total points
ID: 22778720
in cuteFTP there are Event Triggers for Transfer Events. Perhaps they can accomplish the task?

Author Comment

ID: 22832770
I was not able to find the Event Trigger but created a script. I have the script below but can someone help me to only delete the file if upload is successful only.

I only want to do this step when the upload is succesful.
MySite.LocalRemove "C:\Program Files\COMMERCE Connection32\FTP\TCMPI\Outbound\*.edi"

' VBS Script Generated by CuteFTP (TM) macro recorder.
' Generated at: 10/29/2008 10:28:55 AM.

' Create TEConnection object
Set MySite = CreateObject("CuteFTPPro.TEConnection")

' Initialize remote server host name, protocol, port, etc.
MySite.Host = "Host IP"
MySite.Protocol = "FTP"
MySite.Port = 21
MySite.Retries = 30
MySite.Delay = 30
MySite.MaxConnections = 4
MySite.TransferType = "AUTO"
MySite.DataChannel = "DEFAULT"
MySite.AutoRename = "OFF"
' WARNING!!! SENSITIVE DATA: user name and password.
MySite.Login = "username"
MySite.Password = "pswd"
MySite.SocksInfo = ""
MySite.ProxyInfo = ""
' Connect to remote server
MySite.Upload "C:\Program Files\COMMERCE Connection32\FTP\TCMPI\Outbound\*.edi", "/Outbound/"
' Delete local file
MySite.LocalRemove "C:\Program Files\COMMERCE Connection32\FTP\TCMPI\Outbound\*.edi"

Author Comment

ID: 22895911
Can someone let me know what I should add on the script above to check if it's a success first before deleting the file?
LVL 68

Expert Comment

ID: 22896040
Hi again,
I can't help you with the script, but have a look at this brochure -

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With the withdrawal of support for Windows Server 2003 this summer, many clients face the issue of moving away from their 2003 installs. There are a few options out there that many people/companies are selling. But the clients I have, haven't wanted…
Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now