community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

Input Latest Files by Sub Folder Date

Alteryx Certified Partner

Hello,

 

I am trying to update a workflow that grab 5 files from the latest sub folder create date (see below below). The files never change format and the time series of the data is just a week so the workflow just appends the data to a table in a database. Is there a shortcut to tell the input tool to grab the latest sub folder created with the latest files?

FolderSubFOlder.JPG

 

 

Highlighted
Asteroid

Hi rcoolz,

 

I believe you need the directory tool and perhaps the dynamic input tool.

 

The directory tool pointed toward the higher folder will list the subfolders (you may need to click a button in the tool settings), this should be able to be sorted using a creation date column then the latest subfolder used for the input tool with the dynamic input.

 

Apologies, I can't do a test at the moment but I think these two tools (and maybe a sort) will get you there.

 

Chris

Aurora

Hi @rcoolz1 

 

The Alteryx Directory tool is somewhat misnamed, in that it doesn't list the actual directories, only the files contained in the directories.  You can use it for your purpose by sorting on modified date and using FileGetDir(Path) on the most recent file to return its directory.  Use a formula tool to build a complete path using this directory and including a file specifier and pass this to the dynamic input tool.   

 

Dan

Labels