Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here

Download/Upload to FTP/SFTP storage

Highlighted
5 - Atom

I would like to know the easiest and working approach to Download/Upload files to FTP/SFTP. 

What I tried:

 

  • Tried the method mentioned in the following link and got an "Error: Download (1): Error transferring data: Login denied" error.Please note that I'm able to connect to required FTP from the machine using WINSCP. So it is definitely not an IP restriction issue. Another important thing is that the ftp uses TLS/SSL Explicit encryption for connection.                                                                https://community.alteryx.com/t5/Alteryx-Knowledge-Base/File-Transfer-Protocol-FTP-Upload/ta-p/19769
  • Used the approach in the following link to upload a file to FTP https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Upload-a-file-to-FTP-with-the-Run-Command-to...                                                                                                                   This approach is also throwing errors and is probably due to the fact that the connection we use is with TLS/SSL Explicit encryption.

 

Would be helpful if you could provide a solution for the mentioned issues or an alternative approach to upload/download files from/to FTP/SFTP location.

We haven't tried the WINSCP approach as is it could only be workaround instead of any direct approach that alteryx may have.

 

Thanks in Advance.

 

Highlighted
5 - Atom

Hi I am having the same issue trying to download a file from a FTP server using TLS/SSL Explicit Encryption via the Alteryx download tool. Were you able to resolve this issue ?

Thanks

Highlighted
5 - Atom

Hi,

 

I was not able to solve the issue using Alteryx download tool feature from alteryx,but was able to connect to FTPS and upload a file to the same by using WINSCP and batch script. Here are the steps if you are interested in trying out the mentioned method:

 

1.Install Winscp in your machine.

2.Create a batch script calling winscp.com and a .txt file as arguments to the WINSCP.

3.The .txt file will contain the connection parameters.

4.Finally call the batch script from "Run Command" tool in alteryx.

 

Please let me know if you any need additional details.

 

Thanks,

Irfaan

Highlighted
5 - Atom

Irfaan

Can you share more details on how to built the script? I have the same issue with the download tool just giving an access denied error while I can connect using WIN SCP w/o issues to (SFTP). I ran wireshark and see the the SFTP is working SSH and Alteryx with TLS 

Thanks in advance

Highlighted
8 - Asteroid

Here is a template that I use for WINSCP batch file:

option echo off
option batch on

open sftp://<user>:<pwd>;fingerprint=<ssh_key>"
#lcd "C:\Users\XXX123\Temp\Alteryx\FTP\Input"

#dir command below should be replaced with users specified SFTP commands (get, put, etc..)
#<SFTP Command Placeholder>
#dir
exit

 

I then use a series of Find Replace tools to substitute in the various code stubs in the template (marked by the <...> tags).

 

I have attached a package that contains the macro that I created and includes the template for the WINSCP script and the windows batch file.  Hopefully this gets you pointed in the right direction.

Highlighted
7 - Meteor

Hi, I'm trying to adapt your script and I'm wondering if I'm missing something?  I can't seem to find or understand the SFTP Configuration Constants template file.  I don't see it  in the "Input" directory in the package above.  Did I miss something?  Thanks, -Hayes

Highlighted
5 - Atom

Hi,

 

Please try the following 2 steps.

1.Create a .txt file with the following code(please change the required parts):

 

option echo off
option batch on
option confirm off
open ftp://username:password@something.com/ -explicit
cd /folder
put -nopermissions -nopreservetime "D:\Users\User1\Test Files\Tesfile*.csv"
exit

 

2.Create a batch file(.bat file) which calls the above mentioned text file:

 

@Echo off
REM CD "C:\..\WinSCP\"
"C:\..\WinSCP\WinSCP.com" /script="C:\Users\User1\ftpscript.txt" 

 

The script part should call the .txt file created in the first script.Once you run the batch file created in the second step,the file should be updated to respective FTP. Please note that above script is a rough one and there should be a better way to do the same.

 

Please let us know if you were able to get your code working.

 

Highlighted
Alteryx Partner

Hi,

 

I'm using the macro to Archive/Move all input files from one folder to other folder.

The macro works and it is archiving files but Alteryx workflow throws an error (Not sure whether it is showing fake error or what).

 

Can you please let me know if you have any solution to overcome this.

 

Attached is the workflow for reference.

 

 

Labels