<t>Do you mean you want the script's own path so you can reference a file next to the script? Try this:<br/>
<br/>
$scriptpath = $MyInvocation.MyCommand.Path<br/>
$dir = Split-Path $scriptpath<br/>
Write-host "My directory is $dir"<br/>
<br/>
```<br/>
<br/>
You can get a lot of info from $MyInvocation and its properties.<br/>
<br/>
If you want to reference a file in the current working directory, you can use Resolve-Path or Get-ChildItem:<br/>
<br/>
```<br/>
$filepath = Resolve-Path "somefile.txt"<br/>
<br/>
```<br/>
<br/>
EDIT (based on comment from OP):<br/>
<br/>
```<br/>
# temporarily change to the correct folder<br/>
Push-Location $dir<br/>
<br/>
# do stuff, call ant, etc<br/>
<br/>
# now back to previous directory<br/>
Pop-Location<br/>
<br/>
```<br/>
<br/>
There's probably other ways of achieving something similar using Invoke-Command as well.</t>