Jump to content
Software FX Community

PWD in scripts


murray

Recommended Posts

Posted

If i execute c:\scritps\project\script.ps1 (when I'm standing in c:\) and the first line in that script is .\config.ps1 it wont work since config.ps1 is located in c:\scritps\project

Therefore I want to do a "pwd" for the script.ps1 execution dir...

 

How to?! 

Posted

A few things you can do:

1. Add c:\scritps\project to your path, then you can just call "config.ps1", instead of ".\config.ps1" or other.

2. Hardcode c:\scritps\project\config.ps1 in your original script.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...