# FBPROJECTDIR should not contain any "..\\"

**URL:** https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217
**Category:** Bugs
**Created:** [February 25, 2010, 11:41am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217 "2010-02-25T11:41:58Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![entwicklung](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@entwicklung](https://www.finalbuilder.com/forums/u/entwicklung)
#### Post date: [February 25, 2010, 11:41am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/1 "2010-02-25T11:41:58Z")

</div>

Hi

If a have a script which calls an other script and the included script uses the variable "FBPROJECTDIR", the   
variable contains the path of the command line.&nbsp; (See example below)  
  
Project

\ - Project A  
&nbsp;&nbsp; --\>&nbsp;Script1

\ - Include B  
&nbsp;&nbsp; --\>&nbsp;Script2

Script1:&nbsp;Action "Include Project":&nbsp;%FBPROJECTDIR%\..\Include B\Script2.fbp6

Script2:&nbsp;Log Variable %FBPROJECTDIR% --\>&nbsp;"D:\Project\Project A\..\Project B"

I would expect "D:\Project\Project B" since that's the absolute path.

Please fix that.

Thanks, best regards

Andrew

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [February 26, 2010, 5:04am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/2 "2010-02-26T05:04:10Z")

</div>

Hi Andrew,   
  
 We weren’t able to reproduce the issue you’re seeing, could you send in a project into support [at] [finalbuilder.com](http://finalbuilder.com) that we can run which reproduces the problem.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![entwicklung](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@entwicklung](https://www.finalbuilder.com/forums/u/entwicklung)
#### Post date: [February 26, 2010, 8:53am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/3 "2010-02-26T08:53:57Z")

</div>

Sure, please have a look at the attached sample.

[Finalbuilder\_Samples.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/9/943581131c660836733076491b7d1a321f13bc5d.zip) (38.145 KB)

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [March 2, 2010, 5:09am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/4 "2010-03-02T05:09:27Z")

</div>

Hi Andrew,   
  
 Here’s the new test build of FinalBuilder which will expand relative paths for the FBProject & FBProjectDir variables for included projects.   
  
 URL: [https://www.finalbuilder.com/downloads/finalbuilder/630/FB630\_1954.exe](https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1954.exe)  
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![entwicklung](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@entwicklung](https://www.finalbuilder.com/forums/u/entwicklung)
#### Post date: [March 2, 2010, 10:06am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/5 "2010-03-02T10:06:21Z")

</div>

Hi

Thanks. Well done.

One more question, is it possible to get an additional "modifier" for the "set Variable"-Action to do this  
expansion manually too.

Best regards,  
Andrew

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [March 2, 2010, 9:09am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/6 "2010-03-02T09:09:13Z")

</div>

Hi Andrew,   
  
We won't be able to add it as a modifier to the Set Variable action as expanding a relative path requires both the relative path and the base path to expand from, but I'll add it as a feature request for a future version.   
  
You can currently expand a relative path in FinalBuilder using script:   
  
var path = ExpandRelativePath("..\\Test", "C:\\Windows\\");   
  
Regards,   
Paul.

---

<div class="post-metadata">

### Author: ![entwicklung](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@entwicklung](https://www.finalbuilder.com/forums/u/entwicklung)
#### Post date: [March 4, 2010, 7:55am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/7 "2010-03-04T07:55:20Z")

</div>

Hi Paul

Thx for your help.

Just for clarification, the modifier should do the following:  
&nbsp;

**Action:**"Set Variable" (or Path Manipulation)  
**Input:**"D:\Project\Project A\..\Project B"  
**Modifier:**"Reduce to absolute path"  
  
**Output:** &nbsp;"D:\Project\Project B"  
(Something like a path beautifier )

Regards  
Andrew

---

<div class="post-metadata">

### Author: ![entwicklung](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@entwicklung](https://www.finalbuilder.com/forums/u/entwicklung)
#### Post date: [March 16, 2010, 11:38am UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/8 "2010-03-16T11:38:37Z")

</div>

Hi Paul,

I've tested the version you provided. It works, but something else seems to be broken.

Please, have a look at the attachment.  
(With the fixed version the script 1 fails.)

&nbsp;

Regards,

Andrew

&nbsp;

&nbsp;

[FB\_DEMO.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/0/032e5132417902ed404b747753b83803a8bae697.zip) (41.614 KB)

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [March 17, 2010, 12:58pm UTC](https://www.finalbuilder.com/forums/t/fbprojectdir-should-not-contain-any/3217/9 "2010-03-17T12:58:12Z")

</div>

Hi Andrew,   
  
 Here is the latest test build of FinalBuilder which has the problem fixed.   
  
 URL: [https://www.finalbuilder.com/downloads/finalbuilder/630/FB630\_1973.exe](https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1973.exe)  
  
 Regards,   
 Paul.
