中国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-08-06 04:05
48,039 topics / 350,124 posts / today 2 new / 48,251 members
DOS学习入门 & 精彩文章 (教学室) » [Discussion] How much do you know about "set"? ------- Application Examples
Printable Version  20,529 / 66
Floor1 dosz Posted 2006-02-18 06:49
中级用户 Posts 188 Credits 396 From 上海
SET: Design DOS environment variables.
Usage: SET variable=[variable value]

[Discussion] "set" What do you know?--------Application examples
Requirements:
1. Add comments, use REM: or ::
2. Explain the tested environments passed
Floor2 dosz Posted 2006-02-18 07:22
中级用户 Posts 188 Credits 396 From 上海
====== Open Directory.bat =======
set drv=C:\WINDOWS\system32
REM Set the variable named drv to be equal to the string C:\WINDOWS\system32 (the system32 directory in the WINDOWS folder on drive C).
start %drv%
REM Open the directory (open the system32 directory in the WINDOWS folder on drive C).
REM Tested on C drive XP passed
Floor3 sxhc6868 Posted 2006-02-18 19:09
初级用户 Posts 19 Credits 50
Thanks, give it a thumbs up. After reading this post, I can broaden my thinking. I was half-baked and didn't understand the application of the SET command, but now I understand a bit more. The more such good posts, the better.
Floor4 dosz Posted 2006-02-25 12:27
中级用户 Posts 188 Credits 396 From 上海
Do you know what the difference is here?
=============TESTGHO.BAT=========
set LgDrv=1 start 2 A: 7 C: 10 D: 13 E: 16 F: 19 G: 22 H: 25 I: 28 J:
set LgDrv=%LgDrv% 31 K: 34 L: 37 M: 40 N: 43 O: 46 P: 49 Q: 52 R: 55 S: 58
set LgDrv=%LgDrv% T: 61 U: 64 V: 67 W: 70 X: 73 Y: 76 Z: 78

=============TEST.BAT=============
set LgDrv=start A: Z: Y: X: W: V: U: T: S: R: Q: P: O:
set LgDrv=%LgDrv% N: M: L: K: J: I: H: G: F: E: D: C: over

[ Last edited by dosz on 2006-2-25 at 12:29 ]
Floor5 lks205 Posted 2006-03-14 18:36
初级用户 Posts 32 Credits 86
Why did this such a good post not have any follow-up?
Floor6 hxuan999 Posted 2006-11-23 06:10
中级用户 Posts 161 Credits 337
Originally posted by dosz at 2006-2-25 00:27:
Do you know what the difference is here?
=============TESTGHO.BAT=========
set LgDrv=1 start 2 A: 7 C: 10 D: 13 E: 16 F: 19 G: 22 H: 25 I: 28 J:
set LgDrv=%LgDrv% 31 K: 34 L: 37 M: 40 N: 43 O: 46 P: 49 Q ...



Why did you stop talking? Really.
Floor7 ynjzlzd Posted 2006-12-05 21:51
初级用户 Posts 12 Credits 28
Yeah, I've looked for many ways, but I didn't see relevant explanations. I raised it here, but there was no result.
Floor8 redtek Posted 2006-12-05 22:07
金牌会员 Posts 1,147 Credits 2,902
Thanks to the LZ for creating such a valuable post, learned it~~~
Floor9 bc12060101 Posted 2006-12-05 22:17
银牌会员 Posts 712 Credits 1,455
Heheh heh, why did the original poster start a topic and then get interrupted and stop? You should continue, so many brothers are waiting.
Floor10 af01 Posted 2006-12-12 05:05
初级用户 Posts 10 Credits 20
No examples... Still not quite clear
Floor11 vlanmaster Posted 2006-12-20 05:22
初级用户 Posts 46 Credits 100
Why is there no follow-up to such a good post?
Floor12 sleet1986 Posted 2007-01-13 11:21
初级用户 Posts 34 Credits 77 From 景德镇
Still not quite clear!
Floor13 bob1989 Posted 2007-01-25 00:20
中级用户 Posts 144 Credits 322
Floor14 oilio Posted 2007-01-25 05:19
高级用户 Posts 303 Credits 641
Not bad. I also want to know the following content.
Floor15 sphudun Posted 2007-02-08 05:02
新手上路 Posts 4 Credits 10
Born in the WIN era, the seven orifices of DOS are six open
1 2 3 45  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023