【发布时间】:2017-08-16 16:00:04
【问题描述】:
我想获取同一根文件夹的子文件夹中的所有文件,这些文件在子文件夹的名称中都包含相同的字符串(“foo”)。下面没有给我错误,也没有输出。我不知道我错过了什么。
Get-ChildItem $rootfolder | where {$_.Attributes -eq 'Directory' -and $_.BaseName -contains 'foo'}) | echo $file
最终,我不仅想呼应他们的名字,还想将每个文件移动到目标文件夹。
谢谢。
【问题讨论】:
标签: powershell path directory move