小编And*_*rew的帖子

如何将powershell中的当前路径放入变量中

(我不会说英语。希望你能理解。)

你好,我有一个 powershell 脚本(.ps1),它需要使用当前路径(例如“C:\Users\user\Desktop”)。我不知道如何将其设置为变量。我知道变量 $PWD,但它是:

Path          
----          
C:\Users\user\Desktop
Run Code Online (Sandbox Code Playgroud)

我需要它而不需要“路径----”。

谢谢你的回答,安德鲁

powershell path environment-variables powershell-ise

7
推荐指数
1
解决办法
2万
查看次数