Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7398082
  • 博文数量: 1755
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16227
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1755)

文章存档

2024年(1)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: WINDOWS

2012-10-11 14:20:33

$curpatch="C:\Users\Administrator\Desktop\test"
$fileinfo=Get-ChildItem $curpatch -Recurse  -force -Exclude *.inf|?{$_.mode -notmatch "d"}|select fullname
$userlist=$fileinfo|%{gc $_.fullname}#|?{$_ -match "身高|姓名" } #-or $_ -match "姓名"
$usertab=New-Object system.collections.arraylist
for($i=0;$i -lt $userlist.length;$i++){
$user=New-Object psObject|select 姓名,身高
$user.姓名=$userlist[$i++].split(":")[1]
$user.身高=$userlist[$i].split(":")[1]
$null=$usertab.add($user)
}
$usertab
阅读(1744) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~