# Variables That Use Relative Paths Not Expanding When Replacing Values in Files

**URL:** https://www.finalbuilder.com/forums/t/variables-that-use-relative-paths-not-expanding-when-replacing-values-in-files/1282
**Category:** Discussion
**Created:** [August 10, 2009, 4:32am UTC](https://www.finalbuilder.com/forums/t/variables-that-use-relative-paths-not-expanding-when-replacing-values-in-files/1282 "2009-08-10T04:32:12Z")
**Posts on this page:** 2
**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: [August 10, 2009, 4:32am UTC](https://www.finalbuilder.com/forums/t/variables-that-use-relative-paths-not-expanding-when-replacing-values-in-files/1282/1 "2009-08-10T04:32:12Z")

</div>

I have a variety of variables with paths that are relative to the project directory. These paths are evaluated fine in FB but if for example I need to replace a token in a file with one of these variables, FB replaces the text with the relative path syntax which isn't correct. Actually, even in the watch windows, FB still shows the relative path which I would think it wouldn't. I would expect a full path.&nbsp;

The first issue is the bigger problem.

Any thoughts

Thanks&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: [August 11, 2009, 2:42am UTC](https://www.finalbuilder.com/forums/t/variables-that-use-relative-paths-not-expanding-when-replacing-values-in-files/1282/2 "2009-08-11T02:42:17Z")

</div>

Relative paths are not really supported in FB, as they do not make sense. Relative paths in general rely on the concept of a current folder, something that doesn't exist in FB for many reasons, one of which is that it is multi-threaded. A better option is to use variables, and build up paths using variables, e.g :

```
Variable Default Value---------------------------------------------------------------------- SOURCEDRIVE I:\SOURCEROOT %SOURCEDRIVE%\SourceCodePROJECTROOT %SOURCEROOT%\MyProject
```
  
BTW, FB has a built in variables for the path to the current FB project, FBPROJECT (full path to the project file) and FBPROJECTDIR (the folder where the project file lives).   
  
HTH
