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.
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)
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.
i have a similar case, but the file names in Input folder are slightly different, they basically have a year as prefix (2018 abc, 2019 abc, 2020 abc etc ) remaining file name remains same. The macros is only reading the file that I have selected as my input and does not read any other file.