Solved

Auto upload and delete file after succesful upload

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Over the past decade, as Internet security has become a chief concern of IT professionals, one of the most common questions administrators and users ask is, “Which is more secure, SFTP or FTPS?” In short, both file transfer protocols offer a high…
As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
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, f…
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…

820 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