Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include file with relative path

Status
Not open for further replies.

gacaccia

Technical User
May 15, 2002
258
US
i want to build some libraries of routines to call from other powershell scripts. from what i've gathered, you can include something like...

Code:
. c:\folder\script.ps1

at the start of a script to load the other script, making any functions in the file available to the currently running script. however, i've not seen any examples of using a relative path for the include file. i've tried various things to no avail, including...

Code:
.\script.ps1
. .\script.ps1
. script.ps1

how do i do this? i'm using powershell v1.0.

thanks,

glenn
 
Take a look at this and let me know if it helps.


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top