I am trying to figure out how to use relative paths for Powershell scripts. I have a point with absolute paths, but the scripts I write may be in a different base directory, so I need to make sure that the path is relative so that it can be picked up. How can i do this?
So far I have tried:
. .\scripts\variables.ps1
This always raises this exception:
The term '.\scripts\variables.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program...
What lets me know that it cannot find my script? So what am I doing wrong?
source
share