Hi All-
Is there a way to use the Directory and Filter tools to select a Directory, look through the files, and then filter to only the most recently created file based on the file metadata.
My example below allows me to filter on the files that were created after 11/01/2015, but I want to access just the newest file.
Solved! Go to Solution.
Thanks, Chris. I knew it had to be an easy one, I just couldn't come up with the right terms to search for my question.
Chris, any idea as to why the dynamic input tool would then fail afterwards. This could be a seperate issue but figured I'd ask.
The Dynamic Input tool will behave differently depending on the file format.
Looks like you might be trying to read in Excel files?
That's correct Rod and they're the older xls style files.
Not sure if the old XLS files behave the same way, but for XLSX files, I will add a Formula tool before the Dynamic Input that adds the Sheet Name to the Full Path from the Directory tool.
Alteryx is expecting to have the sheet name defined (you can see this when you have a regular Input tool connecting to an Excel file).
The expression in the Formula tool could be something like...[FullPath] + "|Sheet1$".
Thanks for that background Rod. I did as you suggested at it worked perfectly.
Could someone please post that module so I can see how you are configuring that dynamic input tool?
Similar problem as above - I have a folder which contains a number of zipped csv files. I can select the newest file only - that part works fine. I can create the sheet name field using the formula tool, which changes every week. But then when I try to use the dynamic input tool, it doesn’t extract out any data. It works ok, but just doesn't extract any data.
I created a new field called filepath2 which is [FullPath]+"|"+[sheet name]+"|". Again, there are no outputs from this.
What am I doing wrong here?