【发布时间】:2012-04-01 07:16:05
【问题描述】:
所以如果我有一个目录存储在一个变量中,比如说:
$scriptPath = (Get-ScriptDirectory);
现在我想找到目录两个父级。
我需要一个好的方法:
$parentPath = Split-Path -parent $scriptPath
$rootPath = Split-Path -parent $parentPath
我可以在一行代码中到达 rootPath 吗?
【问题讨论】:
标签: powershell scripting