【问题标题】:Is there a PowerShell equivalent to the dir /w of the old Windows command prompt?是否有等效于旧 Windows 命令提示符的 dir /w 的 PowerShell?
【发布时间】:2023-02-14 05:58:50
【问题描述】:

在较旧的 Windows 命令提示符中,dir /w 以宽格式格式化目录输出,提供更直观的内容视图来挑选文件夹名称,而无需滚动浏览垂直堆叠时发生的较大输出。这在终端窗口大小通常受限的 VS Codes 集成终端中特别有用。 PowerShell 有等效项吗?

【问题讨论】:

  • 目录 |全格式
  • 如果你真的想要 dir /w 的完全相同的输出,只需在 powershell 中使用这个命令cmd /r dir /w
  • 说得好,@DSSO21,但是你打错了:/r -> /c
  • @mklement0 cmd /r dir /w 在我的系统上工作

标签: powershell directory formatted


【解决方案1】:

你在找这个吗?

Get-ChildItem | Select-Object -Property Name

它应该等同于“dir /w”。如果我没记错的话。

【讨论】:

    猜你喜欢
    • 2012-10-30
    • 1970-01-01
    • 2016-10-02
    • 1970-01-01
    • 1970-01-01
    • 2022-01-25
    • 2011-12-24
    • 2018-01-04
    相关资源
    最近更新 更多