![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-10 09:58 |
共 47,811 主题排行 / 349,897 发帖 / 今日 0 篇 / 48,255 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » WMIC关于GET NAME的怪事! |
| 可打印版本 747 / 5 |
| 第1楼 hackate | 发表于 2008-11-07 20:11 |
| 中级用户 发帖 125 积分 228 | |
|
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这个列..真是见鬼了...一直琢磨不清楚怎么做呢.. 还请各位高手多多帮忙 |
|
| 第2楼 hackate | 发表于 2008-11-07 21:27 |
| 中级用户 发帖 125 积分 228 | |
|
看来的确有难度的哦.哎..
|
|
| 第3楼 slore | 发表于 2008-11-07 22:41 |
| 铂金会员 发帖 2,478 积分 5,212 | |
|
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> |
|
| 第4楼 hackate | 发表于 2008-11-08 12:41 |
| 中级用户 发帖 125 积分 228 | |
|
我知道了
|
|
| 第5楼 hackate | 发表于 2008-11-08 12:42 |
| 中级用户 发帖 125 积分 228 | |
|
但是如果Extension<>的话就无法取得name
要是=就可以,怎么这就怪了啊。郁闷 |
|
| 第6楼 lxmxn | 发表于 2008-11-08 14:02 |
| 版主 发帖 4,938 积分 11,386 | |
|
用 != 代替 <> 表示不等于。
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |