![]() |
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-26 22:49 |
47,813 topics / 349,918 posts / today 0 new / 48,276 members |
| DOS批处理 & 脚本技术(批处理室) » [Solved] Pure DOS Batch Processing Problem That Hasn't Been Resolved for More Than Half a Year |
| Printable Version 2,921 / 31 |
| Floor16 xiaofking | Posted 2008-01-12 01:58 |
| 初级用户 Posts 31 Credits 72 | |
|
I can directly use find to find the txt text, but it doesn't work with gdisk | find.
Finding "A01" in 1.txt is successful. Failing when using gdisk | find "A01". Can I use config.sys to make gdisk.exe output a txt file on drive A before entering the pure DOS command? |
|
| Floor17 xiaofking | Posted 2008-01-12 02:07 |
| 初级用户 Posts 31 Credits 72 | |
|
gdisk must be output on the screen or in drive A. I tried again. The | symbol probably can't be used? Even a statement like echo aaa | find "aaa" will go wrong. It has nothing to do with find or other issues. I've used N third-party search tools, all the same. As long as there's a |, it doesn't work. If you don't use |, you have to output to a txt file to search...
|
|
| Floor18 terse | Posted 2008-01-12 02:22 |
| 银牌会员 Posts 946 Credits 2,404 | |
|
It should be possible to use |
gdisk | lmod /L2 | find /i "A01" if errorlevel 1 goto end :go1 .................. :end I don't know if the subsequent find can be omitted! Because there is a parameter in lmod that can directly write the A01 to be displayed in , such as: lmod /L2 (since I haven't used it, so I'm not sure) Then judge the return value, I don't know if it can work the same. [ Last edited by terse on 2008-1-12 at 02:43 AM ] |
|
| Floor19 lianjiang2004 | Posted 2008-01-12 10:22 |
| 金牌会员 Posts 1,884 Credits 3,946 | |
|
The reason for the error is that the current drive letter is not writable. Just solve this problem.
|
|
| Floor20 terse | Posted 2008-01-12 15:02 |
| 银牌会员 Posts 946 Credits 2,404 | |
|
Please provide the Chinese content that needs to be translated. As the current content has both Chinese and English parts, please clarify which specific Chinese part needs translation. If it's the Chinese sentence "AUTOEXEC.BAT和CONFIG.SYS的内容看一下 估计在是哪个环节出问题", the translation is "Take a look at the contents of AUTOEXEC.BAT and CONFIG.SYS. Estimate which link is having a problem". The rest of the code part remains as is. So the full translated text would be:
Take a look at the contents of AUTOEXEC.BAT and CONFIG.SYS. Estimate which link is having a problem Next, run lmod with the following test: you can also change it, replace A01 with something else @echo off gdisk | lmod /L2 if errorlevel 1 goto end :go1 echo ok goto exit :end echo no [ Last edited by terse on 2008-1-12 at 03:47 PM ] |
|
| Floor21 lianjiang2004 | Posted 2008-01-12 16:53 |
| 金牌会员 Posts 1,884 Credits 3,946 | |
Originally posted by terse at 2008-1-12 15:02: Can it be used if the current drive is not writable? |
|
| Floor22 terse | Posted 2008-01-12 19:57 |
| 银牌会员 Posts 946 Credits 2,404 | |
Originally posted by lianjiang2004 at 2008-1-12 16:53: Ask the LZ to send the contents of AUTOEXEC.BAT and CONFIG.SYS for a look. The fact that the current drive is not writable is one aspect! But there may be other reasons! How does the LZ boot to DOS? |
|
| Floor23 dooomer | Posted 2008-01-12 20:17 |
| 初级用户 Posts 52 Credits 109 | |
|
It seems that the main difficulty of the original poster is that there is no way to generate a txt temporary file. Isn't there something called a RAM disk? Use memory to virtualize a readable and writable disk, and then redirect the output to a txt file for processing.
|
|
| Floor24 lianjiang2004 | Posted 2008-01-12 20:26 |
| 金牌会员 Posts 1,884 Credits 3,946 | |
Originally posted by terse at 2008-1-12 19:57: On my forum, the original poster has said that it is because it is unwriteable, so it is necessary not to generate intermediate files. Otherwise, using intermediate files would be much simpler? It's just that the original poster didn't clearly state the problem, causing everyone to be at a loss. Hehe. |
|
| Floor25 lianjiang2004 | Posted 2008-01-12 20:29 |
| 金牌会员 Posts 1,884 Credits 3,946 | |
|
Unwritable, this is the key reason that prevents achieving everyone's intentions. If it's unwritable, any solution is in vain. Hehe.
|
|
| Floor26 terse | Posted 2008-01-13 00:52 |
| 银牌会员 Posts 946 Credits 2,404 | |
|
I thought that even if the current disk is not writable, the one at the 20th floor should be okay. It's just that there's no test environment, so I don't know if it works!
|
|
| Floor27 lianjiang2004 | Posted 2008-01-13 07:52 |
| 金牌会员 Posts 1,884 Credits 3,946 | |
Originally posted by terse at 2008-1-13 00:52: Personally, I think that for either solution, the current drive needs to be writable. And this is also the key to the problem. |
|
| Floor28 不得不爱 | Posted 2008-01-13 19:49 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
What is the LZ using GDISK for?
|
|
| Floor29 qzwqzw | Posted 2008-01-13 23:14 |
| 银牌会员 Posts 636 Credits 2,343 | |
| Floor30 everest79 | Posted 2008-01-14 01:06 |
| 金牌会员 Posts 1,127 Credits 2,564 | |
|
gdisk is a partition tool included in Ghost 2k. When gdisk runs without parameters, it defaults to displaying the partition situation of the first disk in the current computer.
|
|
| Prev 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |