GlobalSCAPE User Forum

Forums Register Login My Profile Inbox Address Book My Subscription My Forums

Member List Search Calendars FAQ Ticket List Log Out

Automated file transfer

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [EFT Server] >> EFT Server Scripting >> Automated file transfer Page: [1]
Login
Message << Older Topic   Newer Topic >>
Automated file transfer - 10/21/2009 3:56:55 PM   
cwardnet

 

Posts: 4
Joined: 10/21/2009
Status: offline
I am hoping that someone here has figured out how to set up a custom site command to trigger on a file upload and transfer that file to an internal server.

We have our Secure FTP server set to allow external clients to securely upload files to us. I can trigger an email alert to let me know when files are uploaded but what I really want to do is to immediately and automatically move uploaded files from the server in the DMZ to an internal FTP server (or copy them to an internal file server).

I've read through the documentation on line but there doesn't seem to be a variable to use for the just uploaded file name. Here's a sample script I thought to use as a base but the file name is hard-coded:

Dim WshShell, MySite, Return
  Set MySite = CreateObject("CuteFTPPro.TEConnection")
MySite.Option ("ThrowError") = True
MySite.Host = "ftp://user:pass@myftpsite.com" 'one of the ways to connect using the Pro TE
MySite.Connect
MySite.Upload "c:\archive.zip" 'upload the new archive, then check to see if it made it up to the server.
if not CBool(MySite.RemoteExists("\archive.zip")) then
MsgBox "Failed to Upload, Exiting!"
Else
MsgBox "Success!"
End If
MySite.Disconnect
MySite.Close


Can anyone assist?

TIA,
-Chris
Post #: 1
RE: Automated file transfer - 10/21/2009 4:22:29 PM   
bc747

 

Posts: 27
Joined: 12/30/2008
Status: offline
Hi Chris,

I'm assuming you're using EFT?  If so, there's several different ways to have EFT move a file uploaded to another location within your network.  You probaly would need to open a port within your DMZ to allow EFT to push the files inside your network. 

The trigger you want is "File Uploaded".. you're probably already using that for your email notifications? 

You could modify your existing event rules that email you upon file uploaded and have EFT push the same file to your other internal server.  Just add a "file move" rule to your event using the %FS.PATH% variable for your source file (the variable gets set with the file name when the 'file uploaded' is triggered).  Another variable you could use is %FS.FILE_NAME%.  The file move rule allows a local LAN file move or you can FTP the file to another server assuming the target server allows FTP connections.

Email me directly if you need some screen shots with examples.. 

Hope something here helps..
Richard
richard.jones@sodexo.com

(in reply to cwardnet)
Post #: 2
RE: Automated file transfer - 10/25/2009 8:08:03 AM   
BULL

 

Posts: 336
Joined: 7/27/2006
Status: offline
bc747, it seems he is using Secure FTP Server from his post. That application does not have any options to move a file.

cwardnet I see you are trying to use Cute FTP Pro to move a file.

You could try this basic script:

' VBS Script Generated by CuteFTP (TM) macro recorder.
' Generated at: 10/1/2008 8:37:28 AM.
' Create TEConnection object
Set MySite = CreateObject("CuteFTPPro.TEConnection")
' Initialize remote server host name, protocol, port, etc.
MySite.Host = "MYHOST"
MySite.Protocol = "FTP"
MySite.Port = 21
MySite.Retries = 30
MySite.Delay = 30
MySite.MaxConnections = 100
MySite.TransferType = "AUTO"
MySite.DataChannel = "DEFAULT"
MySite.AutoRename = "OFF"
' WARNING!!! SENSITIVE DATA: user name and password.
MySite.Login = "USER"
MySite.Password = "PASS"
MySite.SocksInfo = ""
MySite.ProxyInfo = ""
' Connect to remote server
MySite.Connect
MySite.Upload "C:\mypath\*.*", "/remotepath/"
MySite.Disconnect
MySite.Close

(in reply to bc747)
Post #: 3
RE: Automated file transfer - 10/28/2009 3:23:21 PM   
cwardnet

 

Posts: 4
Joined: 10/21/2009
Status: offline
Thanks to all who posted. I am using EFT but we didn't get the Enterprise version with file transfer built in.  I was able to figure out how to script the file transfers but its all moot since putting passwords in the script is bad ju-ju.

(in reply to BULL)
Post #: 4
RE: Automated file transfer - 11/18/2009 7:47:06 AM   
mr_d

 

Posts: 1
Joined: 11/18/2009
Status: offline
Please share code.

thanks

(in reply to cwardnet)
Post #: 5
Page:   [1]
All Forums >> [EFT Server] >> EFT Server Scripting >> Automated file transfer Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Try CuteSendIt, the easiest way to send files!

Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.188