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-20 18:37
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » [Discussion] How much do you know about "set"? ------- Application Examples View 19,640 Replies 66
Floor 16 Posted 2007-02-09 10:57 ·  中国 浙江 宁波 电信
中级用户
★★
Credits 300
Posts 137
Joined 2005-11-04 02:00
20-year member
UID 44559
Gender Male
Status Offline
I think it might be equivalent to the following ones

set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15
set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C
The above was obtained in AUTOEXEC.BAT of the WIN98 boot disk. There is also a SETRAMD.BAT. I think these numbers are mainly for the value of findramd in SETRAMD.BAT to serve, which is to prepare to get the drive letters of the virtual disk and CD-ROM.
Floor 17 Posted 2007-02-10 13:58 ·  中国 贵州 贵阳 电信
初级用户
Credits 97
Posts 45
Joined 2007-01-31 06:02
19-year member
UID 78190
Gender Male
Status Offline
It is estimated to be a problem with dual drive letters and partitions
Floor 18 Posted 2007-02-10 14:20 ·  中国 上海 华为云
中级用户
★★
Credits 210
Posts 85
Joined 2007-01-14 12:38
19-year member
UID 76501
Gender Male
From 广东广州
Status Offline
The originally very good topic has become a riddle.
Floor 19 Posted 2007-02-20 12:36 ·  中国 上海 浦东新区 电信
中级用户
★★
一看二跟三动手
Credits 396
Posts 188
Joined 2005-10-23 13:21
20-year member
UID 43919
From 上海
Status Offline
Originally posted by af01 at 2006-12-12 05:05:
No example. Still not quite clear



=== dir lists the current directory and files and appends to dosz.txt ;dosz766.txt.bat ===
:: http://www.cn-dos.net/forum/viewthread.php?tid=19150&fpage=1&highlight=&page=1
:: Floor 『14』: af01 2006-12-12 05:05

@ECHO off
cls
color 0B
echo
ECHO.
echo Hello!
echo This is the batch processing example you want:
ECHO.
echo List the current directory and files and append to dosz.txt; dosz.txt766.bat
pause > nul

ECHO. >> dosz.txt
ECHO ========================================================== >> dosz.txt
ECHO %DATE% %TIME% >> dosz.txt
dir /a /o /b>> dosz.txt
ECHO ========================End============================== >> dosz.txt

: exit ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ECHO. >> dosz766.txt
ECHO ============================================================== >> dosz766.txt
ECHO %DATE% %TIME% >> dosz766.txt
dir /a /o >> dosz766.txt
ECHO ========================End================================== >> dosz766.txt

exit
In the CMD of Win2000/XP/2003 systems, the environment variables %DATE% and %TIME% have already saved the current date and time, so ECHO %DATE% >>IP.TXT and ECHO %TIME%>>IP.TXT can be used
Attachments
dir列出当前目录.rar (685 bytes, Credits to download 1 pts, Downloads: 47)
*/. . . * .
.\* . * dosz
*/ . ./\~~~~~~~~~~~~'\. ^|◆
\* ,/,..,\,...........,\.◆
^|^| ..▎# ▎田 田 ▎ ^| ▎◆
^|^| ^&^&▎ ▎ ▎'^|'▎ o
^|^| ##■■■■■■■■■■〓
Floor 20 Posted 2007-02-20 12:42 ·  中国 上海 浦东新区 电信
中级用户
★★
一看二跟三动手
Credits 396
Posts 188
Joined 2005-10-23 13:21
20-year member
UID 43919
From 上海
Status Offline
Originally posted by vlanmaster at 2006-12-20 05:22:
Why did such a good post have no follow-up?


=== Clear System Junk Files.bat ===

:: http://www.cn-dos.net/forum/viewthread.php?tid=19150&fpage=1&highlight=&page=1
@echo off
cls
color b
ECHO.
echo Hello!
echo.
echo Press any key... Open the directory to view temporary files... Clear system junk
pause >nul
echo Clearing system junk files, please wait......

:: XP= X:\WINDOWS\Temp
:: 2K= X:\WINNT\Temp
START %windir%\Temp
del %windir%\Temp\*.* /Q
:: ==============================================================
cls
color e
ECHO.
echo Hello!
echo Press any key... Continue to open another directory to view temporary files... Clear system junk
pause >nul
echo Clearing system junk files, please wait......
cls

:: = X:\TEMP directory
if exist %systemdrive%\TEMP start %systemdrive%\TEMP
if exist %systemdrive%\TEMP del %windir%\..\..\Temp\*.* /Q
:: ==============================================================
cls
color b
ECHO.
echo Hello!
echo Press any key... Delete the temporary files in the X:\Login User\temp directory, clear system junk
:: Delete files and subdirectories in the X:\Documents and Settings\Login User\temp directory, clear system junk
pause >nul
echo Clearing system junk files, please wait......

cls
:: = X:\Documents and Settings\Login User\Local Settings\Temp
start %temp%
rd %temp% /s /q & md %temp%
:: del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
:: ==============================================================
cls
color e
ECHO.
echo Hello!
echo Press any key... Continue to clear system junk
pause >nul
echo Clearing system junk files, please wait......
cls

if exist del /f /s /q %systemdrive%\*.tmp
if exist del /f /s /q %systemdrive%\*._mp
if exist del /f /s /q %systemdrive%\*.log
if exist del /f /s /q %systemdrive%\*.gid
if exist del /f /s /q %systemdrive%\*.chk
if exist del /f /s /q %systemdrive%\*.old
if exist del /f /s /q %systemdrive%\recycled\*.*
if exist del /f /s /q %windir%\*.bak
:: del /f /s /q %windir%\prefetch\*.*
if exist rd /s /q %windir%\temp & md %windir%\temp
:: del /f /q %userprofile%\cookies\*.*
if exist del /f /q %userprofile%\recent\*.*
:: del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
if exist del /f /s /q "%userprofile%\recent\*.*"
echo System junk cleared
echo.
echo Made by dosz Piggy
echo.
echo February 18, 2007
pause >nul
Attachments
清除系统垃圾文件.rar (819 bytes, Credits to download 1 pts, Downloads: 33)
*/. . . * .
.\* . * dosz
*/ . ./\~~~~~~~~~~~~'\. ^|◆
\* ,/,..,\,...........,\.◆
^|^| ..▎# ▎田 田 ▎ ^| ▎◆
^|^| ^&^&▎ ▎ ▎'^|'▎ o
^|^| ##■■■■■■■■■■〓
Floor 21 Posted 2007-02-21 08:42 ·  中国 浙江 台州 温岭市 电信
高级用户
★★
DOS学徒
Credits 526
Posts 252
Joined 2007-02-12 05:35
19-year member
UID 79286
Gender Male
Status Offline
Don't be a eunuch... Continue talking
Floor 22 Posted 2007-03-21 08:26 ·  中国 上海 电信
初级用户
Credits 70
Posts 34
Joined 2006-10-28 06:23
19-year member
UID 68609
Gender Male
Status Offline
Floor 23 Posted 2007-03-25 23:24 ·  中国 青海 西宁 电信
新手上路
Credits 16
Posts 8
Joined 2007-03-25 08:59
19-year member
UID 82860
Gender Male
Status Offline
Comrades, give a correct answer!
Floor 24 Posted 2007-04-20 22:33 ·  中国 辽宁 大连 联通
初级用户
Credits 70
Posts 38
Joined 2007-03-24 09:25
19-year member
UID 82762
Gender Male
Status Offline
Originally posted by dosz at 2006-2-24 11:27 PM:
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 it end like this???
Floor 25 Posted 2007-06-21 21:23 ·  中国 福建 福州 电信
初级用户
Credits 31
Posts 14
Joined 2007-05-30 12:49
19-year member
UID 89750
Gender Male
From 福建福州
Status Offline
Haha, this help is not bad. It seems that the system's SET /? didn't explain so much. Thanks...
Floor 26 Posted 2007-09-06 09:23 ·  中国 广东 汕头 电信
新手上路
Credits 4
Posts 2
Joined 2007-08-31 03:11
18-year member
UID 96233
Gender Male
Status Offline
Why can't download the attachment?
Floor 27 Posted 2007-09-16 11:48 ·  中国 上海 闵行区 电信
初级用户
Credits 25
Posts 13
Joined 2007-09-16 00:35
18-year member
UID 97499
Gender Male
Status Offline
The LZ wants everyone to use their brains together to test various situations, alas...
Floor 28 Posted 2007-11-09 20:02 ·  中国 江苏 徐州 电信
新手上路
Credits 6
Posts 3
Joined 2007-10-23 20:57
18-year member
UID 100583
Gender Male
Status Offline
I just don't think it's good enough, it's not explained clearly enough
Floor 29 Posted 2007-11-15 01:45 ·  中国 浙江 杭州 阿里云
新手上路
Credits 8
Posts 3
Joined 2007-11-15 01:15
18-year member
UID 102699
Gender Male
Status Offline
Not quite understand,, depressed
Floor 30 Posted 2007-11-15 09:34 ·  中国 河南 平顶山 电信
初级用户
★★
Credits 132
Posts 60
Joined 2006-12-21 08:53
19-year member
UID 74134
Gender Male
Status Offline
Good post, everyone sees and tops it!
Forum Jump: