【发布时间】:2018-08-15 00:36:30
【问题描述】:
我正在尝试通过 PowerShell 获取特定目录中的所有 *.html 文件。
文件夹结构如下:
folder
subfolder1
subfolder2
subfolder3
subfolder4
...
子文件夹按字母顺序排列。存在从 a 到 z 的文件夹。我现在想获取以字母 b 开头的文件夹中的所有 .html 文件。
我试过了
Get-ChildItem -Path *.html -Recurse -Force
这给了我所有文件夹中的所有html 文件。但是如何限制路径,使其只检查以 b 开头的子目录?
【问题讨论】:
-
*.html->b*.html?