标题: WMIC关于GET NAME的怪事!
[打印本页]
作者: hackate
时间: 2008-11-7 20:11
标题: WMIC关于GET NAME的怪事!
wmic datafile where "drive='g:' and Extension<>'bat' and path='\\a\\kg\\'" get * /value
以上命令将会列出g:\a\kg目录下非.bat的文件..
但是我用get name就是无法获取文件名..但是事实上get * /value里面我就看到了有Name这个列..真是见鬼了...一直琢磨不清楚怎么做呢..
还请各位高手多多帮忙
作者: hackate
时间: 2008-11-7 21:27
看来的确有难度的哦.哎..
作者: slore
时间: 2008-11-7 22:41
C:\Documents and Settings\Administrator>wmic datafile where "drive='c:' and Exte
nsion='exe' and path='\\windows\\'" get Name /value
Name=c:\windows\alcrmv.exe
Name=c:\windows\alcupd.exe
Name=c:\windows\explorer.exe
Name=c:\windows\hh.exe
Name=c:\windows\isun0804.exe
Name=c:\windows\isuninst.exe
Name=c:\windows\notepad.exe
Name=c:\windows\regedit.exe
Name=c:\windows\soundman.exe
Name=c:\windows\taskman.exe
Name=c:\windows\twunk_16.exe
Name=c:\windows\twunk_32.exe
Name=c:\windows\winhelp.exe
Name=c:\windows\winhlp32.exe
C:\Documents and Settings\Administrator>wmic datafile where "drive='c:' and Exte
nsion='exe' and path='\\windows\\'" get Name
Name
c:\windows\alcrmv.exe
c:\windows\alcupd.exe
c:\windows\explorer.exe
c:\windows\hh.exe
c:\windows\isun0804.exe
c:\windows\isuninst.exe
c:\windows\notepad.exe
c:\windows\regedit.exe
c:\windows\soundman.exe
c:\windows\taskman.exe
c:\windows\twunk_16.exe
c:\windows\twunk_32.exe
c:\windows\winhelp.exe
c:\windows\winhlp32.exe
C:\Documents and Settings\Administrator>
作者: hackate
时间: 2008-11-8 12:41
我知道了
作者: hackate
时间: 2008-11-8 12:42
但是如果Extension<>的话就无法取得name
要是=就可以,怎么这就怪了啊。郁闷
作者: lxmxn
时间: 2008-11-8 14:02
用 != 代替 <> 表示不等于。
wmic datafile where "drive='g:' and Extension!='bat' and path='\\a\\kg\\'" get name