【发布时间】:2011-03-06 08:16:52
【问题描述】:
我正在使用 PowerShell 2.0,我想通过管道输出某个路径的所有子目录。以下命令输出所有文件和目录,但我不知道如何过滤掉这些文件。
Get-ChildItem c:\mypath -Recurse
我尝试使用$_.Attributes 来获取属性,但是我不知道如何构造一个System.IO.FileAttributes 的文字实例来进行比较。在cmd.exe 中是
dir /b /ad /s
【问题讨论】: