# BPG File Iterator

**URL:** https://www.finalbuilder.com/forums/t/bpg-file-iterator/338
**Category:** Discussion
**Created:** [January 31, 2007, 8:52am UTC](https://www.finalbuilder.com/forums/t/bpg-file-iterator/338 "2007-01-31T08:52:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 31, 2007, 8:52am UTC](https://www.finalbuilder.com/forums/t/bpg-file-iterator/338/1 "2007-01-31T08:52:45Z")

</div>

I have 17 Delphi 7 projects which uses a Delphi Group file. I would like to know how to iterate thru to compile all the projects. I tried adding the BPG Iterator and Run Selected action, I can see it scanned thru 17 projects but not compiled. How do i make this action to compile?  
  
Even the Help doesnt give proper information on “How to”.   
  
Sample would really help.  
  
Thanks  
Arun

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [January 31, 2007, 11:06am UTC](https://www.finalbuilder.com/forums/t/bpg-file-iterator/338/2 "2007-01-31T11:06:03Z")

</div>

Hi Arun,  
  
To use the BPG File Iterator you need to use a Delphi Compiler action as a child of the iterator. An iterator (there are others too), simply run their child actions more than once. Iterators typically set a variable for you to use in the child action - the BPG one does this and sets the variable to the path the the project.  
  
So… here are some steps to help you:  
1. Create a new variable (Tools menu | Edit Variables) called TheProject  
2. In the BPG Iterator select your .bpg file and select the “TheProject” variable in the variables list  
3. Add a Compile Delphi Win32 Project action as a child action of the BPG Iterator (Actions menu | Indent to make it a child)  
4. In the Compile action set the Project file field to %TheProject% (this will be expanded at runtime to the name of the project file). You also need to set any other fields in the Compile action.  
  
hth.  
.t8

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [February 1, 2007, 2:28am UTC](https://www.finalbuilder.com/forums/t/bpg-file-iterator/338/3 "2007-02-01T02:28:08Z")

</div>

Great!. It worked. This is exactly what i was looking for.   
Before this i was able to get till Item 3 but i didnt know how to use %TheProject%  
  
Item 4 needs to be mentioned in the Help file.  
  
Thank you.  
  
Arun
