|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『楼 主』:
 统计用户组信息
 
使用 LLM 解释/回答一下 
 
 
@echo offfor /f "tokens=2 delims=*" %a in ('net user %username%^|find "local"') do @echo %~a
 怎么用这个命令提示错误。
 
 Last edited by yuipr on 2007-2-9 at 03:21 PM ]
 
@echo offfor /f "tokens=2 delims=*" %a in ('net user %username%^|find "local"') do @echo %~a
 How to use this command to prompt an error.
 
 Last edited by yuipr on 2007-2-9 at 03:21 PM ]
 
 
 
 |  | 
|  2007-2-10 03:47 |  | 
|  | 
 
| zh159 金牌会员
 
       
 
 
 积分 3687
 发帖 1467
 注册 2005-8-8
 状态 离线
 | 
| 『第 2 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
在批处理里用%%a(双百分号),命令行用%a(单百分号) 
In batch processing, use `%%a` (double percent signs), and in the command line, use `%a` (single percent sign) 
 
 
 |  | 
|  2007-2-10 04:16 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 3 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
是这样吗:@echo offfor /f "tokens=2 delims=*" %%a in ('net user'%username%'^|find"local"') do @echo %~a   还是不行呢
 
 Last edited by yuipr on 2007-2-9 at 03:23 PM ]
 
Is this the case:@echo off
 for /f "tokens=2 delims=*" %%a in ('net user %username% ^|find "local"') do @echo %~a
 Still no good?
 
 Last edited by yuipr on 2007-2-9 at 03:23 PM ]
 
 
 
 |  | 
|  2007-2-10 04:21 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 4 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
Originally posted by zh159 at 2007-2-9 03:16 PM:在批处理里用%%a(双百分号),命令行用%a(单百分号)
 
麻烦能不能再解释一下啊要,急 
Originally posted by zh159 at 2007-2-9 03:16 PM:In batch processing, use %%a (double percent sign), and in the command line, use %a (single percent sign)
 
Could you please explain it again? I'm in a hurry. 
 
 
 |  | 
|  2007-2-10 04:23 |  | 
|  | 
 
| zh159 金牌会员
 
       
 
 
 积分 3687
 发帖 1467
 注册 2005-8-8
 状态 离线
 | 
| 『第 5 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
for /f "tokens=2 delims=*" %%a in ('net user %username%^|find "local"') do @echo %%~a
 Last edited by zh159 on 2007-2-9 at 03:33 PM ]
 
for /f "tokens=2 delims=*" %%a in ('net user %username%^|find "local"') do @echo %%~a
 Last edited by zh159 on 2007-2-9 at 03:33 PM ]
 
 
 
 |  | 
|  2007-2-10 04:27 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 6 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
Originally posted by zh159 at 2007-2-9 03:27 PM:for /f "tokens=2" %%a in ('net user %username%^|find "local"') do @echo %%~a
 
 Last edited by zh159 on 2007-2-9 at 03:31 PM ]
 
照着你的改了,用批处理执行,什么都没显示,没看到错误,于是命令执行错误如下“ 
C:\>@echo off 
for /f "tokens=2 delims=*" %a in ('net user'%username%'^|find"local"') do @echo 
%~a 
'find"local"' is not recognized as an internal or external command, 
operable program or batch file. 
Originally posted by zh159 at 2007-2-9 03:27 PM:for /f "tokens=2" %%a in ('net user %username%^|find "local"') do @echo %%~a
 
 Last edited by zh159 on 2007-2007-2-9 at 03:31 PM ]
 
Modified according to yours, executed with batch processing, nothing is displayed, no error is seen, so the command execution error is as follows " 
C:\>@echo off 
for /f "tokens=2 delims=*" %a in ('net user'%username%'^|find"local"') do @echo 
%~a 
'find"local"' is not recognized as an internal or external command, 
operable program or batch file. 
 
 
 |  | 
|  2007-2-10 04:33 |  | 
|  | 
 
| zh159 金牌会员
 
       
 
 
 积分 3687
 发帖 1467
 注册 2005-8-8
 状态 离线
 | 
| 『第 7 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
你的'net user'%username%'^|find"local"'写法完全不对,中间没有空格
 'net user "%username%"^|find "local"'
 
 Last edited by zh159 on 2007-2-9 at 03:37 PM ]
 
Your 'net user'%username%'^|find"local"' writing is completely wrong, there is no space in the middle.
 'net user "%username%"^|find "local"'
 
 Last edited by zh159 on 2007-2-9 at 03:37 PM ]
 
 
 
 |  | 
|  2007-2-10 04:36 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 8 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
照你说的改了:C:\Documents and Settings\yichuanj>@echo off for /f "tokens=2 delims=*" %a in ('net user'%username%'^|find "local"') do @echo
 off for /f "tokens=2 delims=*" %a in ('net user'yichuanj'|find "local"') do @ech
 o这是命令执行后,自动显示的。批处理的还是不行,关于用户信息统计你能不写一个完整的批处理发上来啊,弄了一天了,还是没搞定,头都大了,谢谢
 
 Last edited by yuipr on 2007-2-9 at 03:46 PM ]
 
According to what you said, it's modified:C:\Documents and Settings\yichuanj>@echo off for /f "tokens=2 delims=*" %a in ('net user'%username%'^|find "local"') do @echo
 off for /f "tokens=2 delims=*" %a in ('net user'yichuanj'|find "local"') do @ech
 oThis is what is automatically displayed after the command is executed. The batch processing still doesn't work. Can you write a complete batch processing for user information statistics and send it here? I've been struggling for a day and still can't get it done. I'm really frustrated. Thanks
 
 Last edited by yuipr on 2007-2-9 at 03:46 PM ]
 
 
 
 |  | 
|  2007-2-10 04:45 |  | 
|  | 
 
| zh159 金牌会员
 
       
 
 
 积分 3687
 发帖 1467
 注册 2005-8-8
 状态 离线
 | 
| 『第 9 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
user'yichuanj'
 看看你能不能看出什么问题
 
user'yichuanj'
 Let's see if you can spot any issues
 
 
 
 |  | 
|  2007-2-10 04:50 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 10 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
Originally posted by zh159 at 2007-2-9 03:50 PM:user'yichuanj'
 
 看看你能不能看出什么问题
 
我的系统环境是”域“,这个用户是域中的一个用户也是我当前登录本机的用户,没看出来有什么问题。 
My system environment is "domain", this user is a user in the domain and also the user I am currently logged in to the local machine with, and I don't see any problems. 
 
 
 |  | 
|  2007-2-10 04:54 |  | 
|  | 
 
| zh159 金牌会员
 
       
 
 
 积分 3687
 发帖 1467
 注册 2005-8-8
 状态 离线
 | 
| 『第 11 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
net user'%username%'
 user和'%username%'之间没有空格,而且%username%不能用单引号''引用,只能用双引号""引用
 
net user'%username%'
 The space between 'user' and '%username%' is missing, and '%username%' should be enclosed in double quotes "" instead of single quotes ''
 
 
 
 |  | 
|  2007-2-10 04:59 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 12 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
不好意思,我改了C:\Documents and Settings\yichuanj>@echo off
 for /f "tokens=2 delims=*" %a in ('net user "%username%" ^|find "local"') do @ec
 ho %~a
 The user name could not be found.
 
 More help is available by typing NET HELPMSG 2221.
 
I'm sorry, I made a change.C:\Documents and Settings\yichuanj>@echo off
 for /f "tokens=2 delims=*" %a in ('net user "%username%" ^|find "local"') do @echo %~a
 The user name could not be found.
 
 More help is available by typing NET HELPMSG 2221.
 
 
 
 |  | 
|  2007-2-10 05:10 |  | 
|  | 
 
| yuipr 初级用户
 
   
 
 
 
 积分 52
 发帖 25
 注册 2007-2-10
 状态 离线
 | 
| 『第 13 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
Originally posted by qingfushuan at 2007-2-9 04:13 PM:net user %username%是查询当前用户的详细信息,
 
 看你的标题是查询所有的用户信息
 
 去掉%username% 试试
 
C:\Documents and Settings\yichuanj>@echo off for /f "tokens=2 delims=*" %a in ('net user ^|find "local"') do @echo %~a 
off for /f "tokens=2 delims=*" %a in ('net user |find "local"') do @echo %~a 
还是不对呢? 
Originally posted by qingfushuan at 2007-2-9 04:13 PM:net user %username% is to query the detailed information of the current user,
 
 Looking at your title, it's to query all user information
 
 Try removing %username%
 
C:\Documents and Settings\yichuanj>@echo off for /f "tokens=2 delims=*" %a in ('net user ^|find "local"') do @echo %~a 
off for /f "tokens=2 delims=*" %a in ('net user |find "local"') do @echo %~a 
Still not right? 
 
 
 |  | 
|  2007-2-10 05:16 |  | 
|  | 
 
| ccwan 金牌会员
 
       
 
 
 积分 2725
 发帖 1160
 注册 2006-9-23
 来自 河北廊坊
 状态 离线
 | 
| 『第 14 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
你的net user 命令执行后输出的内容含有"local"吗?我这里没有哎。所以在我这里代码是不能用的。 
Does the output of your net user command contain "local"? I don't have it here. So the code doesn't work on my side. 
 
 
 
 |  
                  |  三人行,必有吾师焉。   学然后知不足,教然后知困,然后能自强也。
 |  | 
|  2007-2-10 05:21 |  | 
|  | 
 
| qingfushuan 高级用户
 
     
 
 
 
 积分 502
 发帖 327
 注册 2006-12-30
 状态 离线
 | 
| 『第 15 楼』:
 'net user ^|find "local"'
 
使用 LLM 解释/回答一下 
 
 
执行net user ^| find "local" >>1.txt,1.txt没有内容,说明你这句就不对嘛 
Execute net user ^| find "local" >>1.txt, 1.txt has no content, which means your sentence is wrong. 
 
 
 |  | 
|  2007-2-10 05:21 |  |