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-08-03 17:11
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Attention] Batch Processing Diagnosis Special Room View 17,404 Replies 172
Floor 61 Posted 2003-06-01 00:00 ·  中国 福建 厦门 教育网
初级用户
Credits 218
Posts 26
Joined 2003-05-10 00:00
23-year member
UID 1973
Gender Male
Status Offline
The following is quoted from Wengier on 2003-6-1 10:42:37:
The following is quoted from nihlathak on 2003-5-30 19:50:47:
Yeah, the problem is solved now.
 I changed the path after
 SET TMP=%RAMDRIVE%\TEMP
 SET TEMP=%RAMDRIVE%\TEMP
 PATH=%RAMDRIVE%.;%RAMDRIVE%\SYSTEM
 and now no matter where I am I can run the stuff in those two folders.

 But why exactly?
 I still don't understand!!


That's because DOS automatically searches for programs in all the paths specified in PATH.



But I changed the path statement in
:NEXT
SET SM=
SET DIRCMD=/OGN /4
SET PROMPT=$P$G
PATH=%PATH%;C:.;A:.;..
like this:
:NEXT
SET SM=
SET DIRCMD=/OGN /4
SET PROMPT=$P$G
PATH=%PATH%;C:.;A:.;C:\masm6;c:\bc31\bin;..
but it still doesn't work. Why is that?
Floor 62 Posted 2003-06-02 00:00 ·  中国 广东 广州 神州在线
初级用户
★★
香蕉术士
Credits 317
Posts 52
Joined 2003-05-18 12:00
23-year member
UID 2231
Gender Male
Status Offline
Master Rushi:
I still don't really understand that % question I mentioned above, let me give an example.

1.SET TMP=%RAMDRIVE%\TEMP
2.SET TEMP=%RAMDRIVE%\TEMP
3.XX1=%XXXX1%
4.XX2=%XXXX2%
5.PATH=%RAMDRIVE%.;%RAMDRIVE%\SYSTEM

Do 1 and 2 above represent %1 among the variables? And do 3 and 4 represent %2 and %3 respectively? Is that the right way to understand it?

Then in 5, what do those two pairs of % represent? Are they %4 and %5 among the variables?

In a .bat, can you not use more than 9 pairs of %?

I'm very much a newbie, hope no one laughs at me.
永远支持永远支持
Floor 63 Posted 2003-06-02 00:00 ·  中国 广东 广州 神州在线
初级用户
★★
香蕉术士
Credits 317
Posts 52
Joined 2003-05-18 12:00
23-year member
UID 2231
Gender Male
Status Offline
I'm very much a newbie, hope no one laughs at me.


永远支持永远支持
Floor 64 Posted 2003-06-02 00:00 ·  中国 辽宁 大连 联通
初级用户
Credits 110
Posts 2
Joined 2003-06-02 00:00
23-year member
UID 2886
Gender Male
Status Offline
Why is it that after running MSCONFIG under WIN98 and viewing the AUTOEXEC.BAT file, the batch processing on every machine is different? What exactly do they do?
Floor 65 Posted 2003-06-02 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Usually the autoexec file in win98 is empty...
It's information written in when some software gets installed... not very useful...
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 66 Posted 2003-06-02 00:00 ·  中国 江苏 无锡 电信
初级用户
Credits 105
Posts 1
Joined 2003-06-02 00:00
23-year member
UID 3006
Gender Male
From 江苏
Status Offline
My machine keeps hanging. Can I check it from DOS?
愿我们的相识更精彩
Floor 67 Posted 2003-06-02 00:00 ·  中国 湖北 武汉 汉阳区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Explain in detail...
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 68 Posted 2003-06-03 00:00 ·  中国 广东 广州 联通
初级用户
★★
香蕉术士
Credits 317
Posts 52
Joined 2003-05-18 12:00
23-year member
UID 2231
Gender Male
Status Offline
Master Rushi:
Please help answer my question, this problem has bothered me for a long time.
永远支持永远支持
Floor 69 Posted 2003-06-03 00:00 ·  中国 湖北 武汉 江夏区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
The following is quoted from 我爱dos on 2003-6-2 13:54:42:
Master Rushi:
    I still don't really understand that % question I mentioned above, let me give an example.

1.SET TMP=%RAMDRIVE%\TEMP
 2.SET TEMP=%RAMDRIVE%\TEMP
3.XX1=%XXXX1%
4.XX2=%XXXX2%
 5.PATH=%RAMDRIVE%.;%RAMDRIVE%\SYSTEM

Do 1 and 2 above represent %1 among the variables? And do 3 and 4 represent %2 and %3 respectively? Is that the right way to understand it?

Then in 5, what do those two pairs of % represent? Are they %4 and %5 among the variables?

In a .bat, can you not use more than 9 pairs of %?


That understanding is wrong. %RAMDRIVE% is the RAM drive space. Since the drive letter of the virtual RAM drive is not fixed, % signs are used here to specify it. 3 and 4 are what specify variable values... so DOS can call them.
Generally speaking, the ten variables %0 to %9 are replacement variables...
while %RAMDRIVE%, %cdrom%, etc. are environment variables specified by the set command....
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 70 Posted 2003-06-04 00:00 ·  中国 广东 广州 联通
初级用户
★★
香蕉术士
Credits 317
Posts 52
Joined 2003-05-18 12:00
23-year member
UID 2231
Gender Male
Status Offline
Then is it like this:
A=%a1% (this is %0)
B=%b1% (this is %1)
C=%c1% (this is %2)
D=%d1% (this is %3)
……
……
But then you can't have more than 9 settings, meaning it can't go beyond %9.
For example, if under DOS I enter DIR A, it automatically calls a1.
Is that right??
永远支持永远支持
Floor 71 Posted 2003-06-04 00:00 ·  中国 湖北 武汉 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Mm... yes...
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 72 Posted 2003-06-05 00:00 ·  中国 广东 中山 电信
初级用户
Credits 55
Posts 1
Joined 2003-06-05 00:00
23-year member
UID 3612
Gender Female
Status Offline
Everyone:
I urgently need a large number of bat files, like tutorials, examples
Floor 73 Posted 2003-06-05 00:00 ·  中国 浙江 宁波 象山县 电信
初级用户
Credits 153
Posts 13
Joined 2003-06-04 00:00
23-year member
UID 3406
Gender Male
Status Offline
I still don't understand batch processing very well. I hope all you experts can kindly teach me.
Floor 74 Posted 2003-06-06 00:00 ·  中国 湖北 恩施土家族苗族自治州 电信
初级用户
Credits 125
Posts 5
Joined 2003-06-05 00:00
23-year member
UID 3699
Gender Female
Status Offline
Yeah, an expert is an expert, I admire you.
Floor 75 Posted 2003-06-07 00:00 ·  中国 广东 广州 教育网
初级用户
Credits 185
Posts 26
Joined 2003-06-07 00:00
23-year member
UID 4265
Gender Male
Status Offline
When I was in college I had an idea: to use autoexec.bat to write a virus (of course not a destructive one, I just wanted to prove it was feasible), but I never actually did it. Now I've forgotten all my computer knowledge, so it's even less possible. If any expert is interested, you can give it a try. Remember to hint that it was written by a Chinese person.
‹ Prev 1 3 4 5 6 7 12 Next ›
Forum Jump: