Powershell - 解析 PSDrive 别名之外的路径 [英] Powershell - resolve path outside of a PSDrive alias

查看:71
本文介绍了Powershell - 解析 PSDrive 别名之外的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很长的路径名,我为它创建了一个 PS-Drive

I have a very long path name which I created a PS-Drive for

new-psdrive -name blah -psprovider filesystem -root c:/foo/bar/bizz/bazz/grozz/grizz/blah/blow

我需要将文件传递到外部工具中,该工具无法解析 psdrive 路径中的路径.我如何获得文件的路径(直接在废话下面说目录)位与完整路径?

I need to pass a file into an external tool which is having trouble resolving the path across the psdrive path. How do I get the path to a file (say directly underneath the blah directory) bit with the full path?

推荐答案

这有帮助吗?

(Get-Item "blah:\yourfile.ps1").FullName

这篇关于Powershell - 解析 PSDrive 别名之外的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆