Free Trial

Alteryx Designer Desktop Discussions

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

Moving latest files from existing directory to new direcory in Alteryx?

Kurohits
10 - Fireball

Dear Experts, 

 

Need your attention to solve one the challenges. 

 

I have a directory where business files are regulary saved. I want to create a solution where the most recent files from the existing directory can be cut and paste to new directory.

 

Currently I can find the Copy/Paste option however I don't want to copy files. I want to Cut files from one directory and then Paste it to new directory location and then read files from that new directory. 

 

Is there any workkaround? Happy to hear help on this. 

 

Thanks in advance. 

8 REPLIES 8
DataNath
17 - Castor
17 - Castor

Hey @Kurohits, how are you determining the most recent files here? Those of a certain date/date range? Top N ordered by modified date etc? I think the easiest option here is going to be something along the lines of a Directory tool which then feeds into a Summarize/Formula that'll dynamically build a batch script that is then executed by the Run Command tool.

Zok
8 - Asteroid

Hello

 

You can use Run Command, and use Move in your bat file

 

Use Directory tool to select the files you want to move

 

Example >>

 

And the space at the end of this formula allows you to move multiple files

 

"move " + [FullPath]+' '+[Directory]+'TEST\ '

Zok
8 - Asteroid

The space at the end of this formula allows you to move multiple files

 

"move " + [FullPath]+' '+[Directory]+'TEST\ '

Kurohits
10 - Fireball

@DataNath 

 

Yes, I am using modified date to select latest file. However I need to move these latest files to another new directory and read those files. I am aware that there is a copy/paste option but I need to cut the files and paste it to new directory. 

Zok
8 - Asteroid

You will need to chain apps depending of your version of Alteryx, since you will have trouble to read files that are not already in the right folder.

First move the files

Then open the files in another workflow

Kurohits
10 - Fireball

@Zok 

 

Hey,

 

Looks like this solution will work. 

 

I have never used Run command tool and also don't know how to create BAT file and then move files. 

 

Can you please guide me through step by step process? 

Kurohits
10 - Fireball

@Zok 

 

It's a standard workflow. There are some limitations because of work scope. So, can't really use interface tools to create chained apps. 

 

After moving files, I want to ensure that it's only reading the moved files. 

Zok
8 - Asteroid

In the test file I joined you have the example of creating a bat file and run it

Labels
Top Solution Authors