use %~dp0 in the batch file for the current (unc) path, including the final \
in powershell script use this for current (unc) path without binding \
$0 = $myInvocation.MyCommand.Definition $dp0 = [System.IO.Path]::GetDirectoryName($0)
Paul van wijck
source share