Solved

Auto upload and delete file after succesful upload

Posted on 2008-10-22
4
2,771 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), 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…

759 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

19 Experts available now in Live!

Get 1:1 Help Now