2017-01-13 2 views
0

Diese sehr einfach sein muss aber ja ich will aufzuspalten-Pfad "E: \ Somefolder \ ps \ pow.ps1"Split-Path Power

So von

Split-path "Path" -Parent 

ich mit den Eltern bekommen Pfad zB "E: \ Somefolder \ ps" aber ich möchte nur "E: \ Somefolder" Irgendwelche Vorschläge?

Antwort

1

gut! Gut! Ich konnte es mit der folgenden Zeile tun:

Split-Path (Split-path $MyInvocation.InvocationName -Parent)