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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to SEARCH files on Windows shares from a MAC? 2 60
Converting jpg to pdf file format 5 87
Automate File Copy Tasks 8 102
VPN Shared folder Access 3 74
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…
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…

805 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