How do I do this in PowerShell. In a batch file I would do: %~d0%~p0
+2
A:
From Get-ScriptDirectory to the Rescue blog entry ...
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
JP Alioto
2009-07-25 22:09:00