![]() |
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-03 09:44 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Seeking help, there's an error when using findstr to search for strings!! |
| Printable Version 1,565 / 7 |
| Floor1 lotus516 | Posted 2007-01-28 08:47 |
| 高级用户 Posts 246 Credits 551 | |
|
To deal with the annoying panda, I specially made a P, but still had problems after compiling for an afternoon!!!
The purpose is to automatically replace with the backup if my EXE file is bound with other programs!! Can't find it successfully!!Troubled by the same-named files inside!! If there is no same-named file (such as unins000.exe, Setup.EXE), it is normal, but I'm looking for the full path!! It should be a parameter problem!! The following is the yjsj.txt file, the first one is the size of the original program!! [ Last edited by lotus516 on 2007-2-3 at 02:39 AM ] |
|
| Floor2 lotus516 | Posted 2007-01-29 00:43 |
| 高级用户 Posts 246 Credits 551 | |
|
No one is here. Bump it up by myself!!
|
|
| Floor3 lotus516 | Posted 2007-02-02 10:37 |
| 高级用户 Posts 246 Credits 551 | |
|
Push it to the water surface!!
|
|
| Floor4 heicai | Posted 2007-02-02 13:20 |
| 中级用户 Posts 156 Credits 385 | |
|
The landlord, I support you!
Can you explain this sentence? I'm a newbie in learning. 'findstr "%%~nxb" d:\yjsj.txt') do if %%~zb NEQ %%c E:\工具\WinRAR\RAR.EXE e -Y E:\bf.rar %%~nxb "%%~dpb" |
|
| Floor5 liuyechun | Posted 2007-02-03 00:54 |
| 新手上路 Posts 5 Credits 12 | |
|
Try using the echo statement?
echo …… ^|findstr %%~nxb |
|
| Floor6 zh159 | Posted 2007-02-03 01:13 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
|
For should generally not use consecutive letters. For example, the first for %%a, the first for %%b, the first for %%c. Generally, there should be more than 5 letters apart (depending on the for delimiter segment setting): %%a, %%i, %%n
|
|
| Floor7 lotus516 | Posted 2007-02-03 02:12 |
| 高级用户 Posts 246 Credits 551 | |
Originally posted by heicai at 2007-2-2 13:20: %%~nxb is an extension of %%b, searching in the YJSJ.TXT file, %%~zb is the file size extended from %%b, %%c is the value assigned by the for statement, that is, the original file size in the YJSJ.TXT file!!! Compare whether %%~zb is equal to %%C, if not equal, execute the RAR decompression command! %%~dpb is an extension of %%b, for extensions, please refer to c:\windos\help\ntcmds.chm!! [ Last edited by lotus516 on 2007-2-3 at 02:17 AM ] |
|
| Floor8 anqing | Posted 2007-02-05 13:02 |
| 高级用户 Posts 413 Credits 859 | |
|
Since there are backup files, do we still need to write this bat?
Manual replacement Do you want this bat to run on your computer all the time for monitoring? That's too wasteful of system resources, right? But your bat is quite interesting I think it can be regarded as an intermediate-level manifestation of bat applications |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |