# Double list iterator

**URL:** https://www.finalbuilder.com/forums/t/double-list-iterator/3788
**Category:** Feature Requests
**Created:** [December 6, 2006, 5:02am UTC](https://www.finalbuilder.com/forums/t/double-list-iterator/3788 "2006-12-06T05:02:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)
#### Post date: [December 6, 2006, 5:02am UTC](https://www.finalbuilder.com/forums/t/double-list-iterator/3788/1 "2006-12-06T05:02:08Z")

</div>

The list iterator is one of the best features in FB, but what would make it even better would be having a double list iterator - two parallel lists, with each value going into a different variable. So you could do stuff like this:productreadme.txt | Readme.Txtfile29875.exe | Product.exe…Then have a rename operation renames from the first variable to the second. There are ways of achieving this atm (like, putting a delimiter in the middle of the list items), but they’re a bit fragile and inelegant.Alternatively, a lookup object where you could define key/value pairs would be great - combined with a normal list iterator you would get the same functionality. Again, there are ways of achieving this, with .ini files for instance, but an actual object (like a fileset) would be great…Steve

---

<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: [December 6, 2006, 5:23am UTC](https://www.finalbuilder.com/forums/t/double-list-iterator/3788/2 "2006-12-06T05:23:16Z")

</div>

yeah, interesting idea, thanks Steve.  
  
(one iterator I use often is the ADO Dataset iterator - it lets you set multiple variables for each iteration based on the values in a row in the database).

---

<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: [December 6, 2006, 7:59am UTC](https://www.finalbuilder.com/forums/t/double-list-iterator/3788/3 "2006-12-06T07:59:04Z")

</div>

Steve,  
  
If I understand correctly, then what you are essentially talking about is processing CSV text. I’m made requests for this option and it is supposedly on their To Do list.  
  
For example, after a build, I have a tool that runs a checksum on all the files in a specific directory. So I created a CSV file to specify which directories to run in, and the name of a file to save the results to:  
File1,Dir1  
File2,Dir2  
File3,Dir3  
ect  
I wanted to use a List Iterator to go through the list, run the tool on Dir1, save the results to File1, then go to the next line.  
FinalBuider does not have a convienant way to do this, so you can see the work around I devised in this thread:  
[https://www.finalbuilder.com/forums.aspx?forumid=7&postid=1451&view=topic](https://www.finalbuilder.com/forums.aspx?forumid=7&postid=1451&view=topic)  
  
It basically goes like this:  
Iterate CheckSum.csv, each line to Variable CSVLine  
DOS Command, use the FOR command to break the line down to an INI file  
Read Variables From INI  
Using tool, using variables just read  
Iterate next line…  
  
And again that DOS command would look like this:  
FOR /f “delims=,tokens=1-3” %%A in ("%CSVLine%") do ECHO[FBVariables]\>%TempINI%&ECHO Col1=%%A\>\>%TempINI%&ECHOCol2=%%B\>\>%TempINI%&ECHO Col3=%%B\>\>%TempINI%  
and would output an INI file like this:  
[FBVariables]  
Col1=  
Col2=  
Col3=

---

<div class="post-metadata">

### Author: ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)
#### Post date: [December 7, 2006, 1:48am UTC](https://www.finalbuilder.com/forums/t/double-list-iterator/3788/4 "2006-12-07T01:48:51Z")

</div>

Eep, are you sure you need DOS commands? If you must take the format you described as input, then I would as a first stage rewrite it as an .ini file with Text/Replace.  
[Section]  
c:\out\out1.txt=d:\dir1  
c:\out\out2.txt=d:\dir2  
…  
  
Then use the .ini file iterator to parse that stuff really easily. I did something like this myself.  
I’d be extremely surprised if there was something you needed FOR’s token parsing for that you couldn’t do with regular expression Text Find/Replace.  
  
Steve
