I generate a dynamic date range(7 days) using the Generate Rows tool to add to file names for Dynamic Input. The problem is that the Dynamic Tool will throw an "File Not Found" error if there is a missing file for one of the days in the date range. In other words, there may not be a file for every day in the dynamic date range. Can you suggest a workaround or better way to input the files within a dynamic date range?
Solved! Go to Solution.
Probably many ways to do this. I would use a Directory tool to read in all the files in the directory, then, use a Join tool to join them to your data stream just before the Dynamic Input. Take the inner join, and that should be only the files that have the names you created, AND are actually in the directory. And then feed that into the Dynamic Input tool.
OR, it might save you a few steps to just create a filter or formula of some sort to filter the files coming from the Directory tool and not use the Generate Rows tool.
Cheers!
Thanks so much. Your idea with the Directory tool and inner join worked great! I did have to add a formula tool with Left function before the Join to parse out the dates in the file names - only because there was extra text. Thanks again for the help.
Glad to help!