Batch Macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@gantaanvesh
Can you give a bigger picture for the 2nd one? and better a sample workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@gantaanvesh
Thank you for the follow up.
Here are my thoughts for your consideration.
- The path shall be fixed as input for the Directory Tool.
- The control table provides the schedma which should be same for the files you are going to read. This should be better saved as same path of your workflow.
- For the output path, you can bring it in the workflow then specifiy it in the Output tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@gantaanvesh , I have made few changes in your workflow. Please try it once and you need to check the include subdirectories checkbox.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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"
