Hi All,
I am trying to create a batch macro to read the multiple .txt files from different folders. So i have followed the below method attached in the 2nd & 3rd image to achieve the goal.
But now i had challenge that files has to read based on the control table as shown below because if any new files comes in some different folders we will be updating the control table file by giving the source file name, file path and target paths so that based on this condition files should read and write in the macro. Can someone help me with logic how to give that parameters.
Thanks in advance
Solved! Go to Solution.
@gantaanvesh
Can you give a bigger picture for the 2nd one? and better a sample workflow.
@Qiu I have attached the workflows and the control table based on which i wanted to read the source file and write to target path
@gantaanvesh
Thank you for the follow up.
Here are my thoughts for your consideration.
Hi @Qiu
Thanks for the response.
I tried the steps that mentioned in the previous reply but unfortunately am not able to achieve the solution, can you please help me with the workflow.
@gantaanvesh , I have made few changes in your workflow. Please try it once and you need to check the include subdirectories checkbox.
I can see the only change in the workflow is include subdirectories checkbox, but in my case its not mandatory that folders will there in one parent folder it can be in any other folder as well. Basically files should read and write based on the control table details as attached in the above image
@gantaanvesh , In that case you will have to change your workflow into macro and add control parameter to send the values from control table one by one and process it. So your workflow will have nested macro one for directory update and other for data fetch in each directory.
Hello
I am trying to modify the batch macro for reading and writing the files based on the source path and target path given in the control table file
When i ran without output file it is giving me an result but when i add the output and in the macro am getting the below error, can someone help me on the same
Note that in the Macro screenshot you provided, the Control Parameter is updating the file path value including the Excel sheet name. The value from your parent workflow is likely missing the sheet name appended to the end of the file path. The expected format is <file path>|||<sheet name>. For example, "C:\temp\New Microsoft Excel Worksheet.xlsx|||Sheet1"