# Referencing a file in the repo

**URL:** https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941
**Category:** Discussion
**Created:** [April 9, 2013, 4:54am UTC](https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941 "2013-04-09T04:54:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![seankearon](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/seankearon/32/112_2.png) [@seankearon](https://www.finalbuilder.com/forums/u/seankearon)
#### Post date: [April 9, 2013, 4:54am UTC](https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941/1 "2013-04-09T04:54:44Z")

</div>

I am running a Powershell action in my build.&nbsp; The script is trying to access a module that is located in another folder in the repository.&nbsp; However, the folder is not being brought into the workspace. &nbsp;  
  
Script being run is in:  
  
$Source.MY-REPO$\V2\Bus\Common\blah-blah-blah\build.ps1  
  
The script is referencing:   
  
$Source.MY-REPO$\V2\Bus\SOME-FOLDER  
  
How can I make bring the folders I need across, or otherwise reference them?

---

<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: [April 10, 2013, 12:29pm UTC](https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941/2 "2013-04-10T12:29:20Z")

</div>

Hi Sean   
  
 You need to make sure your repository rules are set to include the source you need :   
  
 [http://wiki.finalbuilder.com/display/continua/Repository+Rules](http://wiki.finalbuilder.com/display/continua/Repository+Rules)   
  
 If you haven’t touched the repository rules then the default (for the first stage at least) is to put everything into the workspace. Are you sure your script is not using hard coded paths? If so, change them to relative paths because each build is done in it’s own individual workspace folder.

---

<div class="post-metadata">

### Author: ![seankearon](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/seankearon/32/112_2.png) [@seankearon](https://www.finalbuilder.com/forums/u/seankearon)
#### Post date: [April 10, 2013, 10:17am UTC](https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941/3 "2013-04-10T10:17:09Z")

</div>

Hi Vincent   
  
 What a great feature - didn’t know about that one!   
  
 I only have one stage so far, and my rules are the default configuration:

> #Source rules   
> #---------------------------------------------------   
> #export all source to agent workspace   
> $Source$ \> Source   
> #---------------------------------------------------

   
  
 The PS script is actually doing a search of parent directories from the script’s folder, so there’s nothing hard coded going on.   
  
 Any ideas for what to try now?

---

<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: [April 10, 2013, 11:09am UTC](https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941/4 "2013-04-10T11:09:57Z")

</div>

On the rules tab, turn on the option to log the source files, that will at least tell you what source is on the agent. Don’t forget to turn it off when you are done though as it will slow down your builds

---

<div class="post-metadata">

### Author: ![seankearon](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/seankearon/32/112_2.png) [@seankearon](https://www.finalbuilder.com/forums/u/seankearon)
#### Post date: [April 10, 2013, 1:08am UTC](https://www.finalbuilder.com/forums/t/referencing-a-file-in-the-repo/4941/5 "2013-04-10T01:08:25Z")

</div>

My bad - turns out what the script was looking for wasn’t checked in! Many thanks for your help again.
