如何在Windows命令行上搜索目录?我正在寻找与资源管理器类似的行为。在资源管理器中,键入文件时,它将搜索文件和目录。我想从命令行执行此操作。有没有办法做到这一点?
cmd.exe:
dir /AD /S DirName
PowerShell 2:
Get-ChildItem -Recurse -Filter DirName | ? { $_.PSIsContainer }
PowerShell 3:
Get-ChildItem -Recurse -Directory -Filter DirName
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句