首页 > 系统服务 > 详细

PowerShell 列举磁盘文件

时间:2016-03-24 16:32:36      阅读:268      评论:0      收藏:0      [点我收藏+]
#用户指定需要的盘符,格式如“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


本文出自 “汜水流年_” 博客,请务必保留此出处http://timefiles.blog.51cto.com/8475652/1754822

PowerShell 列举磁盘文件

原文:http://timefiles.blog.51cto.com/8475652/1754822

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!