中国DOS联盟论坛

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-11-10 21:39
47,815 topics / 349,930 posts / today 0 new / 48,291 members
DOS批处理 & 脚本技术(批处理室) » [Attention] Batch Processing Diagnosis Special Room
Printable Version  19,516 / 172
Floor61 Nihlathak Posted 2003-06-01 00:00
初级用户 Posts 26 Credits 218
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?
Floor62 我爱DOS Posted 2003-06-02 00:00
初级用户 Posts 52 Credits 317
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.
Floor63 我爱DOS Posted 2003-06-02 00:00
初级用户 Posts 52 Credits 317
I'm very much a newbie, hope no one laughs at me.


Floor64 lichina Posted 2003-06-02 00:00
初级用户 Posts 2 Credits 110
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?
Floor65 如是大师 Posted 2003-06-02 00:00
元老会员 Posts 3,351 Credits 9,654 From 湖北
Usually the autoexec file in win98 is empty...
It's information written in when some software gets installed... not very useful...
Floor66 6779766 Posted 2003-06-02 00:00
初级用户 Posts 1 Credits 105 From 江苏
My machine keeps hanging. Can I check it from DOS?
Floor67 如是大师 Posted 2003-06-02 00:00
元老会员 Posts 3,351 Credits 9,654 From 湖北
Explain in detail...
Floor68 我爱DOS Posted 2003-06-03 00:00
初级用户 Posts 52 Credits 317
Master Rushi:
Please help answer my question, this problem has bothered me for a long time.
Floor69 如是大师 Posted 2003-06-03 00:00
元老会员 Posts 3,351 Credits 9,654 From 湖北
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....
Floor70 我爱DOS Posted 2003-06-04 00:00
初级用户 Posts 52 Credits 317
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??
Floor71 如是大师 Posted 2003-06-04 00:00
元老会员 Posts 3,351 Credits 9,654 From 湖北
Mm... yes...
Floor72 tianchang Posted 2003-06-05 00:00
初级用户 Posts 1 Credits 55
Everyone:
I urgently need a large number of bat files, like tutorials, examples
Floor73 zhouyong5120 Posted 2003-06-05 00:00
初级用户 Posts 13 Credits 153
I still don't understand batch processing very well. I hope all you experts can kindly teach me.
Floor74 Englishboy Posted 2003-06-06 00:00
初级用户 Posts 5 Credits 125
Yeah, an expert is an expert, I admire you.
Floor75 yykbyykb Posted 2003-06-07 00:00
初级用户 Posts 26 Credits 185
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 … 2 3 4 5 6 7 8 … 12  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023