Loop / Batch - Mode
I want to use the Batch / Loop functionality to minimize my work
I explain in short what I want to achieve.
I have a folder with ~800 .asc files. I want to process them according to a script file I created.
As far as I understand I have to crate a .bat file which contains the script files for each cloud. But how do I modify the script that the selection of the clouds is automatically done?
Or do I have to modify each script file and change the line with the file path?
Since the .xsct2 file is rather messy regarding the filepath it would be quite a lot of work to modify it 800 times. Is there some workaround?
In essence, how do I create a loop which processes each file successively?
RE: Loop / Batch - Mode - Added by Piboule Alexandre about 1 year ago
If you use the batch mode, yes you would need to generate yourself one script for each file.
This process would be improved in future versions of Computree.
However, there is a better way in ComputreeV5 (http://rdinnovation.onf.fr/projects/computree-beta-version-base/files):
The solution is to use a looping step in your script :
- First add following step: "*Load/Create a list of readers*”, selecting good format, and choosing all your files (perhaps begin by a smaller selection to do tests)
>> This will only load files names and set lodaing parameter, but not load data
- Second add"*Workflow/Loops/1- Loop on groups*”
>> This will keep only one file per loop turn
- Third add "*Load/2- Load file using readers*” to actually load one file data per turn
- Here add all your script steps (for export you can use the adaptative checkbox in exporters, to have a output file names corresponding to current loop turn file name)
- At the end, add "*Workflow/2- Ends a loop in the script*”, for the loop to work (will unload previous turn data, and load next turn data...)
I hope it will help you.
If needed ask for more explainations (on forum or by mail).
One day... I will do tutorials on that (hopefully this year).
RE: Loop / Batch - Mode - Added by Meissner Tobias about 1 year ago
thank you for your reply. Thats very good news!
I’ll try this approach as soon as I finish my next exam and report back.
Best regards and thank you for your effort with this program