![]() |
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-08-07 02:53 |
48,040 topics / 350,125 posts / today 1 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » Check document contents (quite a lot): if present then exit, if not then continue |
| Printable Version 838 / 5 |
| Floor1 ygwhm | Posted 2008-01-05 12:50 |
| 初级用户 Posts 9 Credits 22 | |
|
1: Need to check whether there is an a.ini file under the c:\WINDOWS directory. If there is, give a prompt and exit; if not, continue to the next step.
2: Then check whether the c:\WINDOWS\b.xml document also does not contain the string abc. If it does, give a prompt and exit; if not, continue to the next step. 3: Check whether the mysql service exists. As long as it exists, regardless of whether it is started or not, give a prompt and exit. If it does not exist, continue to the next step. 4: Check whether the system is Windows 2003. If not, give a prompt and exit. If yes, continue to the next step. 5: Check whether the current bat directory is in NTFS format. If not, give a prompt and exit. If yes, continue to the next step. This newbie has been messing with it for ages and still doesn't understand, so I'm asking everyone for advice. Thanks! [ Last edited by ygwhm on 2008-1-5 at 12:54 PM ] |
|
| Floor2 HAT | Posted 2008-01-05 19:28 |
| 版主 Posts 5,017 Credits 9,023 | |
|
if exist C:\windows\a.ini (echo yes) else (echo no)
|
|
| Floor3 HAT | Posted 2008-01-05 19:32 |
| 版主 Posts 5,017 Credits 9,023 | |
|
findstr /c:"abc" C:\windows\b.xml>nul&&echo yes||echo no
|
|
| Floor4 HAT | Posted 2008-01-05 19:33 |
| 版主 Posts 5,017 Credits 9,023 | |
|
sc query mysql|find "1060">nul&&echo yes||echo no
|
|
| Floor5 HAT | Posted 2008-01-05 19:49 |
| 版主 Posts 5,017 Credits 9,023 | |
|
type nul>"%temp%\isntfs.txt"&&cacls "%temp%\isntfs.txt" /g everyone:f /e>nul&&echo NTFS partition||echo non-NTFS partition
|
|
| Floor6 ygwhm | Posted 2008-01-05 20:21 |
| 初级用户 Posts 9 Credits 22 | |
|
Thanks.
hat, help me take a look at how to handle this. http://www.cn-dos.net/forum/viewthread.php?tid=36777&fpage=1&highlight= |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |