Split-Path & UNC

split-path works with with UNC paths as well as normal paths

 

PS> $path = "\\UNCserver\TFSBuilds\componenet\v11.1\XS11.1\XS11.1_11.1.0.35"
PS> Split-Path -Path $path -Parent
\\UNCserver\TFSBuilds\componenet\v11.1\XS11.1

 

PS> Split-Path -Path (get-location) -Parent
C:\scripts

Published Mon, Sep 19 2011 21:47 by RichardSiddaway
Filed under:

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: