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-07-28 04:58
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Share] My Partial Collection of Batch Scripts View 82,395 Replies 1,173
Floor 16 Posted 2006-12-07 09:02 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Strongly request students from 2F, 5F and 12F to share their hidden codes!
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
fqhuanyingni +1 2023-08-01 14:24

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 17 Posted 2006-12-07 10:31 ·  中国 广东 江门 电信
新手上路
Credits 10
Posts 4
Joined 2006-10-11 13:06
19-year member
UID 65327
Status Offline
Collected. Thanks for sharing
Floor 18 Posted 2006-12-07 20:08 ·  中国 湖北 宜昌 电信
初级用户
Credits 30
Posts 26
Joined 2006-10-25 12:39
19-year member
UID 68219
Gender Male
Status Offline
Recent Ratings for This Post ( 3 in total) Click for details
RaterScoreTime
freeapple +1 2006-12-09 02:14
baomaboy -15 2007-06-03 16:06
a6626236 -1 2008-05-06 17:00
Floor 19 Posted 2006-12-07 23:39 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Originally posted by electronixtar at 2006-12-6 20:02:
Strongly request students in 2F, 5F and 12F to share their private codes!!!

  In response to the call from classmate electronixtar, I will post the codes I have collected usually. Some are written by me, and most are commented. Some codes were written a long time ago, and there are many places that are not very well considered. I won't upload relatively large scripts - half a year ago, I was still a fledgling beginner, hehehe.
Recent Ratings for This Post ( 5 in total) Click for details
RaterScoreTime
HUNRYBECKY +2 2006-12-13 21:40
flamey +2 2007-01-05 23:49
electronixtar +23 2007-02-21 00:15
sxs88 +2 2007-08-10 22:14
dosz +1 2009-03-05 02:20
Attachments
DOS批处理代码.rar (146.12 KiB, Credits to download 1 pts, Downloads: 2052)
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 20 Posted 2006-12-07 23:52 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
Thank you, moderator, for sharing!
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 21 Posted 2006-12-07 23:55 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
Brother namejm really noted the source and original author in the code. That's really meticulous.
Infinite admiration...
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 22 Posted 2006-12-08 00:17 ·  中国 四川 绵阳 江油市 电信
初级用户
Credits 28
Posts 11
Joined 2006-11-17 23:22
19-year member
UID 70847
Gender Male
Status Offline
Thanks
Floor 23 Posted 2006-12-08 00:52 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
Wow, same as namejm, I also became very interested in CMD during the National Day holiday (when I was in the Batch Processing Bar).

Just now I saw namejm's collection and found a "Funny Boot.bat", which also appeared in the Batch Processing Bar. But this code uses continuous screen refreshing to achieve animation, so the screen will shake. If implemented with VBS, this problem can be solved:

::CMD 2000 Boot Funny Code Complete Simulation

@echo off
::::::::::::::::::::::::::
:Generate VBS script to display animation
echo CD=Wscript.Arguments(1)>showplan.vbe
echo Str=Wscript.Arguments(0)>>showplan.vbe
echo Time_Delay=Wscript.Arguments(2)>>showplan.vbe
echo Switch1=Wscript.Arguments(3)>>showplan.vbe
echo Switch2=Wscript.Arguments(4)>>showplan.vbe
echo Str_Len=len(Str)>>showplan.vbe
echo Show_Str Str,Str_Len,CD,Time_Delay,Switch1,Switch2>>showplan.vbe
echo wscript.stdout.write vbcrlf>>showplan.vbe
echo Function Show_Str(str,strlen,CD,Speed,Switch1,Switch2)>>showplan.vbe
echo IF Ucase(Switch2)=^"Y^" then>>showplan.vbe
echo Show_Cursor 8,CD>>showplan.vbe
echo End if>>showplan.vbe
echo IF str^<^>^"^" then>>showplan.vbe
echo For i=1 to strlen>>showplan.vbe
echo if i mod 2=0 then>>showplan.vbe
echo Cursor=^" ^">>showplan.vbe
echo else>>showplan.vbe
echo Cursor=^"_^">>showplan.vbe
echo end if>>showplan.vbe
echo IF i=strlen then>>showplan.vbe
echo Cursor=^" ^">>showplan.vbe
echo End if>>showplan.vbe
echo IF Ucase(Switch1)=^"Y^" then>>showplan.vbe
echo str1=str1 ^& ^"^>^">>showplan.vbe
echo wscript.stdout.write chr(13) ^& CD ^& str1^&Left(str,79-i) ^& chr(8)>>showplan.vbe
echo Else>>showplan.vbe
echo wscript.stdout.write chr(13) ^& CD ^& Left(str,i)^&Cursor^& chr(8)>>showplan.vbe
echo End if>>showplan.vbe
echo wscript.sleep Speed>>showplan.vbe
echo Next>>showplan.vbe
echo Else>>showplan.vbe
echo Exit Function>>showplan.vbe
echo End if>>showplan.vbe
echo End Function>>showplan.vbe
echo Function Show_Cursor(Num,CD)>>showplan.vbe
echo for i=1 to Num>>showplan.vbe
echo if i mod 2=0 then>>showplan.vbe
echo Cursor=^" ^">>showplan.vbe
echo else>>showplan.vbe
echo Cursor=^"_^">>showplan.vbe
echo end if>>showplan.vbe
echo wscript.stdout.write chr(13) ^& CD ^& Cursor ^& chr(8)>>showplan.vbe
echo wscript.sleep 200>>showplan.vbe
echo Next>>showplan.vbe
echo End Function>>showplan.vbe
:Initial setup;
set str1=Booting
set str2=Booting fast
set str3=Damn it, booting
set str4=Do you boot or not you son of a bitch
set str5=Fuck!! If you don't boot again, I'll smash you!!
set str6=is not an internal or external command, nor is it a runnable program
set str7=or batch file.
set str8================================================================================
:::::::::::::::::::::::::::::::::::::::::::::::
:Main control program;
cscript.exe showplan.vbe %str1% "%~dp0>" 120 "" "Y" //nologo
call :Msg %str1%
cscript.exe showplan.vbe %str2% "%~dp0>" 100 "" "Y" //nologo
call :Msg %str2%
cscript.exe showplan.vbe %str3% "%~dp0>" 180 "" "Y" //nologo
call :Msg %str3%
cscript.exe showplan.vbe %str4% "%~dp0>" 180 "" "Y" //nologo
call :Msg %str4%
cscript.exe showplan.vbe %str5% "%~dp0>" 80 "" "Y" //nologo
cscript.exe showplan.vbe "" "" 100 "" "Y" //nologo
echo Loading Windows 2000 ...
echo.
cscript.exe showplan.vbe %str8% "" 50 "Y" "" //nologo
del showplan.vbe
:Msg
ping -n 2 127.0.0.1>nul
echo '%1'%str6%
echo %str7%
echo.
Floor 24 Posted 2006-12-08 05:43 ·  中国 甘肃 兰州 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Hehe, there are quite a few regs.
Floor 25 Posted 2006-12-08 07:08 ·  中国 河南 郑州 电信
中级用户
★★
Credits 439
Posts 170
Joined 2006-01-09 20:29
20-year member
UID 48707
Status Offline
Originally posted by youxi01 at 2006-12-8 00:52:
Wow, same as namejm, I also became very interested in CMD during the National Day holiday (when I was in the batch processing bar).
Just now I saw namejm's collection and saw a "Funny Boot.bat", in the batch processing...



Wonderful
bat c c++
Floor 26 Posted 2006-12-08 11:05 ·  中国 广东 梅州 电信
初级用户
Credits 34
Posts 12
Joined 2005-10-15 15:44
20-year member
UID 43537
Status Offline
Fine collection
Thanks for sharing
Floor 27 Posted 2006-12-08 11:10 ·  中国 江苏 常州 溧阳市 电信
新手上路
Credits 8
Posts 4
Joined 2006-12-07 10:27
19-year member
UID 72823
Gender Male
Status Offline
Thanks
Floor 28 Posted 2006-12-09 00:35 ·  中国 上海 普陀区 电信
初级用户
★★
Credits 153
Posts 68
Joined 2006-10-12 22:25
19-year member
UID 65507
From 上海
Status Offline
个人主页-找餐厅:http://www.canting.cc
Floor 29 Posted 2006-12-09 00:37 ·  中国 上海 普陀区 电信
初级用户
★★
Credits 153
Posts 68
Joined 2006-10-12 22:25
19-year member
UID 65507
From 上海
Status Offline
Originally posted by namejm at 2006-12-7 23:39:

  In response to classmate electronixtar's call, I will post the codes I usually collect. Some are written by me, mostly with comments added. Some of the codes were written a long time ago, and there are many places where consideration is not...

Thank you, the dedication of the moderator is admirable, downloading and learning...
个人主页-找餐厅:http://www.canting.cc
Floor 30 Posted 2006-12-09 02:11 ·  中国 广东 广州 荔湾区 电信
初级用户
Credits 56
Posts 25
Joined 2006-11-26 09:48
19-year member
UID 71778
Gender Male
Status Offline
Salute to the original poster and the classmates on the 19th floor
Forum Jump: