Alteryx Designer Desktop Discussions

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

Move .csv files from a generic folder into their own respective folder

rogersm01
7 - Meteor

Hi

 

I have a folder structure where 20+ files are stored by period in one folder. The file names are the same every month but the location changes by period. Once the files are checked they need to be moved to a repository, each file having it's own folder, replacing the previous months file.

 

No manipulation is needed, it's just a case of picking them up and placing one by one into their own folder on a different server.

 

Is there an easy way to set this up? I'm very new to Alteryx so sorry if this is extremely simple!

 

Thanks

5 REPLIES 5
mceleavey
17 - Castor
17 - Castor

Hi @rogersm01 ,

 

You need to build a dynamic .bat command which can be triggered via the command prompt tool. To do this you can create a field which dynamically uses the filenames in a formula:

 

move Source-Folder-Path*.* Destination-Folder-Path

The * represents a wildcard, so it can be absolute to the filename, or any files that fit a part of the name.

 

This will then move the files you want to move.

You can then either output the file and trigger the .bat file, or run the command in the command tool:

 

mceleavey_0-1638972351106.png

 

Alternatively, you can download the Teknion toolkit from HERE, which contains a tool to do it all for you:

 

mceleavey_1-1638972441902.png

 

Hope this helps,

 

 

M.

 



Bulien

Jonathan-Sherman
15 - Aurora
15 - Aurora

Didn't know about the Teknion toolkit but definitely going to give it a download even if it's just for the File System tool. Thanks @mceleavey!

rogersm01
7 - Meteor

thanks - I'll look into that

Samanthaj_hughes
ACE Emeritus
ACE Emeritus

Literally just did this, this week too and into sharepoint linked files on Alteryx Server.

 

I love command line, within Alteryx, don't forget the power of a block until done tool, so you can write your files and then move them when they have been written. 

 

If you need that option, of course.

#Alteryxrocks
mceleavey
17 - Castor
17 - Castor

@Jonathan-Sherman ,

 

Yeah, they're simple things just wrapped nicely into single tools that do a lot of file movement, S3 and SFTP stuff. Quite neat.

 

M.



Bulien

Labels