Batch process subdirectories in main directory


 Product:MicroStation
 Version:V8i
 Environment:N\A
 Area:Batch Processing
 Subarea:N\A

communities.bentley.com/.../BatchFiles.zip

Load all .dgn files in Directory and subdirectories for batch processing

How to create the list of files

1. Open Windows Command Prompt

2. Navigate to the main directory where desired files are stored               

3. Use the “dir /s/b *.dgn >dgnlist.txt” command to create a text file of all .dgn files under the current directory. It is recommended to create the text file to a specified location using a full path.

4. Open the created txt file either in notepad or excel and copy the contents into Column B in the TemplateForBatch.xlsx worksheet

5. Use the auto fill feature to fill column A, C, and D.

6. Select Column A and copy the contents into the first empty cell in column A

7. In the first empty cell in column C enter “[MODEL=:AllModels:]” and use the autofill function.

8. Use the autofill on Column E.

9. Select all contents in the sheet and use the sort tool to sort all information based on Column A by Value from Smallest to Largest

10. Select all contents of Column E and copy the contents into the BatchTemplate.bprc file, when done save the BatchTemplate.bprc as a new file and name appropriately.               

11. In MicroStation Launch the Batch Process utility open the desired .bprc and create or load an existing command file to run.

12. Run the batch process.

See also

Batch Process Blog series

Other language sources

 Original Author:David Trejo-Rodriguez