Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

FTP/SFTP- Rename

Martin_Bosak
7 - Meteor

Hi there!

 

is there any way how to rename a file on FTP server via Alteryx?

I've managed to connect there and download files using Download tool, but is the best way to rename them on SFTP side?

Or what command line tool are you using? 

 

Thank you

Martin

 

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

You could create an FTP script file in which you list all your commands and execute it from your bat file in a single line like this:

Bat file:

FTP -v -i -s:C:\PathTo\ftpscript.txt

ftpscript.txt:

open example.com
username
password
cd myfolder
rename myfile.txt mynewfile.txt
disconnect
bye

Using Alteryx, you can update the ftpscript.txt file to be the names of the files and then upon successful execution of the workflow, you can execute the BAT file. 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
anthony
11 - Bolide

Pretty sure it could be accomplished with WinSCP and their command line options for SFTP.

 

I use putty/pagent for ssh and winscp can use those connections for sftp. Then I would suspect you would used a CMD tool/batch file to run the rename.

 

Not the simplest but could be done.

mceleavey
17 - Castor
17 - Castor

Hi @MarqueeCrew, just wondering if I could pick that massive brain of yours.

 

I'm trying to build this to rename multiple, dynamically determined files and was wondering what the syntax would look like for multiple files.

Would I concatenate the name_now new_name combinations so it would look something like:

 

open sftp://sftp.myurl/PO_TEST/
rename sftp://sftp.myurl/PO_TEST/88676786.CSV sftp://sftp.myurl/JLP/PO_TEST/PROCESSED/88676786.CSV

             sftp://sftp.myurl/PO_TEST/64476643.CSV sftp://sftp.myurl/JLP/PO_TEST/PROCESSED/64476643.CSV

             sftp://sftp.myurl/PO_TEST/45645565.CSV sftp://sftp.myurl/JLP/PO_TEST/PROCESSED/45645565.CSV

disconnect
bye

 

...or do I need to generate new files/rename strings per record?



Bulien

MarqueeCrew
20 - Arcturus
20 - Arcturus
I would try per record. I haven't tried this before. I saw PS scripts, but that seemed like overkill.

Sorry,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors