# Text $(OutDir) seem to cause problems for some actions

**URL:** https://www.finalbuilder.com/forums/t/text-outdir-seem-to-cause-problems-for-some-actions/3425
**Category:** Bugs
**Created:** [February 17, 2012, 1:38am UTC](https://www.finalbuilder.com/forums/t/text-outdir-seem-to-cause-problems-for-some-actions/3425 "2012-02-17T01:38:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bent\_tranberg](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@bent\_tranberg](https://www.finalbuilder.com/forums/u/bent_tranberg)
#### Post date: [February 17, 2012, 1:38am UTC](https://www.finalbuilder.com/forums/t/text-outdir-seem-to-cause-problems-for-some-actions/3425/1 "2012-02-17T01:38:44Z")

</div>

The action Team Foundation Latest Version Number was broken. This was quicly fixed, so I don't have a problem at the moment. However, while creating a workaround, I came across some other issues. This is one of them.

I was running an action Execute Program, which did exactly what&nbsp;Team Foundation Latest Version Number&nbsp;was supposed to do. You only need to know that it is a command that outputs text, and the output was stored in a variable Output.

When running action List Iterator&nbsp;with content %Output% I got the following log lines:  
&nbsp; Setting items...  
&nbsp; Error expanding Item List : Variable : OutDir - does not exist!  
&nbsp; Error while searching for items : Failed to expand list of items.

I then inserted another action&nbsp;Write to Text File&nbsp;immediately after Execute Program so I could study the content of variable Output, to see if that mysterious "OutDir" was within. And this unexpectedly resulted in this log entry for Write to Text File:  
&nbsp; Error expanding Content : Variable : OutDir - does not exist!

I then studied the output of the Execute Program in the log, and eventually found this line in the output of the command:

49 &nbsp; &nbsp; patrik:2 &nbsp; 09.02.2010 &nbsp; Attemt &nbsp;with adding extra path $(OutDir) to

Now, there's the mysterious OutDir it seems to me.

Is this a bug?&nbsp;Is there some processing going on that shouldn't be going on? Is there some option I overlooked? In my opinion these actions shouldn't try to parse variable contents just like that, especially if there is no option to prevent it.

I solved this by adding a workaround to my workaround, which simply replaces all "$" with "X" in variable Output before I go on to parse its lines inside the List Iterator loop.

&nbsp;

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [February 17, 2012, 10:58am UTC](https://www.finalbuilder.com/forums/t/text-outdir-seem-to-cause-problems-for-some-actions/3425/2 "2012-02-17T10:58:23Z")

</div>

It’s not a bug, variables recursive expand their content by default :   
  
 [http://help.finalbuilder.com/variable\_evaluation\_and\_recurs.htm](http://help.finalbuilder.com/variable_evaluation_and_recurs.htm)   
  
 $(OutDir) matches an alternate variable reference syntax so the exansion code deems it to be a variable.   
  
 The simple resolution is to use the ! symbol to disable recursive expansion on a variable :   
  
 e.g. %!Output%

---

<div class="post-metadata">

### Author: ![bent\_tranberg](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@bent\_tranberg](https://www.finalbuilder.com/forums/u/bent_tranberg)
#### Post date: [February 20, 2012, 6:58am UTC](https://www.finalbuilder.com/forums/t/text-outdir-seem-to-cause-problems-for-some-actions/3425/3 "2012-02-20T06:58:37Z")

</div>

Aha! I guess I need to read through all the help doc. Thanks.
