This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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?
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.
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.