Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Copy files on SFTP server
Topic Summary: Copy files to a different directory on the same SFTP server
Created On: 06/13/2018 02:48 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 06/13/2018 02:48 PM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

1. Automate Enterprise v11.0.6.11
2. Windows Server 2012 R2

I'm need to copy files between directories on the same SFTP server. For example, I need to copy a bunch of TXT files from /home/automation/ to /home/automation/archive/.

I've tried using FXP by pointing the Source & Destination server sessions to the same session and by logging into the same server twice but giving each session its own name. In neither case were the text files copied.

Is there some way to do this that I've overlooked or do I need to download the files to a different location and then upload them back to the archive folder on the original SFTP server?
 06/15/2018 09:30 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello Mark,

Have you tried using our FTP - Synchronize Folder action?

Synchronizes folders located on the FTP server with folders located on the local machine. Folders can be synchronized either uni-directionally (one-way) or bi-directionally (both ways). Other options include the ability to ignore or overwrite existing files, include/exclude masks and checksum validation.

Let us know if that works for you.

-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 06/15/2018 10:28 AM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

I have not tried that action yet. I was hoping there was a way that didn't require transmitting the files multiple times. The basic workflow that we want is:
    Download *.txt from /home/automation/ on SFTPServer to \\WinServer\Directory\.
    Move the *.txt from /home/automation/ on SFTPServer to /home/automation/archive also on SFTPServer.
 06/18/2018 02:52 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello Mark,

Unfortunately the action doesn't allow you to move files across the FTP locations.

It is best to try the synch or to use the method you are currently using.

We apologize for the inconvenience.

-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 06/20/2018 02:28 PM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

Are there any plans to add actions allowing us to move files around on the same SFTP server without having to download them to another server?
 06/20/2018 03:19 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello Mark,

That is a feature request (24321) in our database however we are unable to comment on when it will be added to our software.

I apologize for the inconvenience.

-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 06/21/2018 06:19 AM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

Richard,

Understood and thanks!
 06/21/2018 01:14 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Mark,

I have successfully tested FXP to copy files from one FTP location to another FTP location on the same server. Are you trying to copy or move? Either situation can be accomplished using FXP, except that a move would be copy and then deletion of the original file location.

-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 06/21/2018 01:55 PM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

Leonard,

How did you setup the FXP action to do this? Did you just reuse the same Session for both the Source & Destination server session? If so, I've tried doing that but the files never showed up in the destination.
 06/22/2018 11:45 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Mark,

I create 2 separate FTP Logon steps to the same server but with separate FTP sessions. Then reference the 2 different sessions in the FXP step.

-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 06/22/2018 12:01 PM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

Hmm, I thought I'd already tried that. I'll give it another shot and let you know if it works for me. Thanks for the suggestion.
 06/28/2018 12:40 PM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

Nope, I updated my test task to have 2 separate FTP Logon steps to the same server but with separate FTP session names. I then used the different session names as the source & destination servers in an FXP step. I followed that up with a step to write a message to our log file, and that message shows that the FXP step was successful; but on double-checking the destination directory via FileZilla, no files were found.
 07/05/2018 06:39 AM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello Mark,

Is it possible to post your current steps to make sure the setup is ok? You can use "dummy data" in place of any sensitive information. We are looking only looking at the setup of the steps.

thank you.

-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 07/06/2018 07:18 AM
User is offline View Users Profile Print this message

Author Icon
MarkMckibben
Student (5-19 posts)

Posts: 14
Joined: 06/07/2018

I figured out a different way to do what I needed. Rather than using FXP to sync the files, I used the Rename file(s) FTP action and just changed the path to the files between the Remote file(s) and New name fields.

For example:
Remote file(s) = /home/ftp/MM*.txt
New name = /home/ftp/sent/MM*.txt

I ran the task with this action, received no errors within Automate; and on double-checking the server in FileZilla, my files were in the correct directory.
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 419 guests browsing this forum, which makes a total of 419 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2019 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog