Hey everyone, I need help to figure out the following scenario:
I want to browse a folder, which contains a list of files that will serve as inputs in my workflow (say Input1.txt, Input2.xlsx). The contents i.e. the data in each of the file may change but the structure will remain the same in terms of columns and the file name will remain the same as well. When the user selects the desired folder, the files should map to the input tool based on the file name and should run through the workflow and save to an output file eventually. I tried to create a demo workflow(attached below Testing_v3.yxwz) which pops an error(image attached: current_error)
Current scenario, I use File Browse tool, but it takes some time to manually select each file that I want to use, for which I'm looking at an alternate solution to do the same. (Image attached: current1)
Solved! Go to Solution.
Use a Directory tool to show all the files in the folder
Make a batch macro to import 1 file and do whatever you want to it (it could output within the batch macro if each input should result in 1 output), or in your main query, just after the batch macro you can work with all the files combined together.
Your control parameter will be the filepath. Inside the batch macro you can do a dynamic input and switch the path to each incoming filepath fed into the batch macro from the directory tool.