China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 08:59
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » This is the content of a batch file, please give guidance. View 2,823 Replies 3
Original Poster Posted 2002-11-11 00:00 ·  中国 广东 广州 联通
初级用户
Credits 229
Posts 37
Joined 2002-11-09 00:00
23-year member
UID 207
Gender Male
Status Offline
:w_rec4 " Ghost Recovery Wizard "

Ready
==========

Now ready to restore partition %P% from %gfile% to partition %N% of hard disk %M% on this computer!

Before this, please make sure that the files in partition %N% of hard disk %M% have been backed up!
Once the recovery starts, all data in this partition will be overwritten and cannot be recovered!

Please enter uppercase OK and press the button to start the recovery,
otherwise press the button to return.


::

:ghost
call quit
cls
ghost
goto end

:exit
call quit
cls

:end
set isOK=
set gfile=
set gname=
set gsize=
set gzip=
set gpath=
set m=
set n=
set p=
set ?=
set wbat=
if exist %temp%\tmp.txt del %temp%\tmp.txt

This is a batch file writing the backup wizard for Ghost. The file requires entering uppercase OK and then pressing OK to perform the recovery. If I want to remove the function of that uppercase OK and make it directly press OK to start the recovery, how should I modify it? Please give me advice,,, can you provide the entire source code?
Floor 2 Posted 2002-11-12 00:00 ·  中国 浙江 金华 义乌市 电信
初级用户
Credits 108
Posts 2
Joined 2002-10-24 00:00
23-year member
UID 55
Gender Male
Status Offline
It should be that removing "" will be okay. It just gives an input field. I tried it, and it's the same whether I input or not, and the case is the same. If you want uppercase, you must add the U parameter, and if you must input, you need to add the! parameter.

Floor 3 Posted 2002-11-13 00:00 ·  中国 广东 广州 联通
初级用户
Credits 229
Posts 37
Joined 2002-11-09 00:00
23-year member
UID 207
Gender Male
Status Offline
No, no! It doesn't work. If you don't enter the uppercase OK, it won't work. I've tried it.
Floor 4 Posted 2009-01-20 14:27 ·  中国 辽宁 沈阳 浑南区 电信
新手上路
Credits 7
Posts 6
Joined 2008-12-27 17:53
17-year member
UID 135100
Gender Male
Status Offline
First, try setting isOK=OK
Forum Jump: