【问题标题】:How to path to a folder in powershell 2.0 that has '[]' in the folder name如何路径到文件夹名称中包含“[]”的powershell 2.0中的文件夹
【发布时间】:2018-07-26 20:07:22
【问题描述】:

我试图从文件夹name [] 中包含这些字符的路径中删除文件夹,就像这样

c:\blah\blah\[_EFI_HotFolder_]\[MoveFolder].

我对 PS 很陌生,我尝试了很多事情都没有成功,似乎也找不到任何关于此的主题。

PS 2.0

【问题讨论】:

  • help Get-ChildItem -full 并读取(特别注意-LiteralPath 参数)。
  • 非常感谢你,这很有意义。你真的为我节省了几个小时。

标签: windows powershell scripting powershell-2.0


【解决方案1】:

您可以使用 -LiteralPath 来指定路径检查帮助 Get-ChildItem -full 正如比尔建议的那样

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-05-22
    • 2019-03-28
    • 2016-02-27
    • 1970-01-01
    • 1970-01-01
    • 2015-11-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多