标签:style blog color io 2014 div log sp
1 $text = "\\127.0.0.1\D$\Hotfix\Hotfix_Win2003\2014-04" 2 $pathRoot = [System.IO.Path]::GetPathRoot($text) 3 $driverLetter = $pathRoot[-2] 4 Join-Path ("$driverLetter" + ":") $text.Substring($pathRoot.Length, $text.Length - $pathRoot.Length)
$pathRoot的返回值为:\\127.0.0.1\D$
判断路径:
test-path "filesystem::\\127.0.0.1\d$"
标签:style blog color io 2014 div log sp
原文地址:http://www.cnblogs.com/dreamer-fish/p/3927153.html