Solved

Auto upload and delete file after succesful upload

Posted on 2008-10-22
4
2,824 Views
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.
0
Comment
Question by:tvae
  • 2
  • 2
4 Comments
 
LVL 68

Accepted Solution

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

Author Comment

by:tvae
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.Connect
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"
MySite.Disconnect
0
 

Author Comment

by:tvae
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?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 22896040
Hi again,
I can't help you with the script, but have a look at this brochure -
 
http://help.globalscape.com/help/cuteftppro7/
 
wmp
0

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 (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. 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