![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-13 22:54 |
47,812 topics / 349,916 posts / today 0 new / 48,268 members |
| 论坛回收站 » Please provide the specific content that needs to be translated and have the script details so that I can help you translate it. |
| Printable Version 1,910 / 0 |
| Floor1 wwx0423 | Posted 2009-06-23 08:11 |
| 初级用户 Posts 30 Credits 33 | |
|
What I want to implement is: Find whether the size of the hots file of each computer is the specified size. If it is, record the computer name; if not, do not record.
Now I have a txt file, and each line in it is a computer name. Suppose there are 100 lines, that is, 100 computers. First, I want to use the for command to grab the computer names in the TXT file and save them to a variable, and then implement the automatic mapping net use K: \\computer name\c$\windows\system32\etc (Because I don't know how to extract it very well, I don't know how to use the for command) Judge whether the mapping is successful. If it is not successful, assign the value N to a variable. If it is successful, continue to perform the following operations. dir K:\hots >> d:\1.txt (view the information of the hots file and record it to the 1.txt file) Then use for again to analyze the file size part in the txt text. If the size of the HOTS file is 750K, record the computer name. In the end, a text is generated. The format of this text is Computer (this only shows the computer name, indicating that the size of the hots file is the size to be compared) Computer name, N (this means that the mapping of the computer is not successful) > and >> are used, just one overwrites and the other appends. Please help me write this batch processing. Thank you! |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |