#用户指定需要的盘符,格式如“c:\” $zonename=Read-Host("please input need check disk zone,For example [C:\]") CD $zonename #A打头文件夹筛选扫描 Get-ChildItem | where {$_.Name -match "^a"} | select fullname | Out-File a.txt $file = Get-Content "a.txt" foreach ($a in $file) { Write-Host $a } #使用完后清除文件 del a.txt
PowerShell 列举磁盘文件
原创bard_zhang 博主文章分类:PowerShell ©著作权
©著作权归作者所有:来自51CTO博客作者bard_zhang的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
linux 磁盘空间大小查看
df -hl 查看磁盘剩余空间du -sh [目录名] 返回该目录的大小
linux 磁盘空间 大小查看