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-29 16:20
中国DOS联盟论坛 » 意见反馈 & 网友交流 » Make the batch file loop infinitely View 3,027 Replies 10
Original Poster Posted 2007-01-30 10:27 ·  中国 湖南 联通数据上网公共出口
社区乞丐
★★
gaoshou
Credits -16
Posts 77
Joined 2007-01-30 09:11
19-year member
UID 78105
Gender Male
Status Offline
This can make your batch file loop infinitely.

It's very simple.

First, write your command well, and then add a %0 in the next line.

Try it yourself. TMD, I have to set 1000 points to read a post. You can kill me!

I just created the account. I don't know if his is more professional.

Good things should be shared! Oh...


─────────────────── Moderation Record ───────────────────
Performed by: namejm
Description: This post was moved from DOS Batch & Script Technology (Batch Processing Room)
─────────────────── Moderation Record ───────────────────


[ Last edited by namejm on 2007-2-1 at 09:17 PM ]
Floor 2 Posted 2007-01-30 10:29 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
The moderator has said:
Originally posted by namejm at 2007-1-27 20:01:
  Given the harmfulness of this code, a score limit of 1000 points has been added.
Floor 3 Posted 2007-01-30 10:39 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

Due to the harmful nature of this code, a 1000-point credit limit has been added.

Hehe, in this way, the thread starter can't come in anymore

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 4 Posted 2007-01-30 10:39 ·  中国 湖南 联通数据上网公共出口
社区乞丐
★★
gaoshou
Credits -16
Posts 77
Joined 2007-01-30 09:11
19-year member
UID 78105
Gender Male
Status Offline
This can make your batch file loop infinitely.

Very simple.

First, put your command well, then add a %0 on the next line.

Try it yourself. TMD I have to set 1000 points to read a post. You can kill me.

I just created an account. I don't know if his is more professional.

Good things should be shared! 靠.......
Floor 5 Posted 2007-01-30 21:25 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
Take it easy, upstairs. I have over 900 points, and you have more than a dozen points. It's not worth getting so worked up. People don't owe you anything.
Floor 6 Posted 2007-01-30 21:47 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
The issue of points is a form of consensus in the network, but it still has flaws. Does a newly registered member with a low score necessarily have low level?

But we should see that most people come with a curious mentality. Many don't even read the basic requirements of the forum and the member code of conduct. Such people are very likely to cause losses due to misusing code or cause losses to others, which is what none of us want to see. There's no denying that members with high points have been in the forum for a longer time, know the rules more, and are less likely to cause harm. Everyone should understand the good intentions of the moderators.

There are many things to learn, isn't that right?
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 7 Posted 2007-01-30 22:24 ·  中国 四川 内江 电信
新手上路
Credits 4
Posts 2
Joined 2007-01-27 05:24
19-year member
UID 77806
Gender Male
Status Offline
Why does adding it allow an infinite loop?
Floor 8 Posted 2007-01-30 23:07 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
RE hngaoshou:

  First of all, his code is much more ruthless than your idea, and the harmfulness is quite great. From the current understanding, the system cannot be ended from the infinite loop without forcibly restarting the system.
  Second, your idea is indeed an idea of an infinite loop. Members who have stayed in this forum for a longer time should all know this idea, but it is just that no one has specifically posted about it because it is relatively easy.

  A major feature of this forum is the maximum openness of resources. Plus, the point limit is mainly considering the harmfulness of the code, to prevent members who do not understand the power of that code from making a big mistake due to carelessness. As a technical forum with a quite high level, it will not be boring to add a 1000-point point limit to a simple post.

  In view of the fact that your post contains components for giving opinions, and you have made two times of less considered repeated contents in this post, among which there are uncivil remarks, I will lock this post and move it to the "Opinion Feedback & User Communication" area after one day.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 9 Posted 2007-04-22 09:30 ·  中国 浙江 杭州 电信
新手上路
Credits 2
Posts 1
Joined 2007-04-16 02:37
19-year member
UID 85329
Gender Male
Status Offline
Understand!!Understand!!Understand!!Understand!!Understand!!Understand!!Understand!!Understand!!Understand!!
Floor 10 Posted 2007-04-23 11:26 ·  中国 广东 广州 海珠区 电信
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
%0 represents itself.
--------------------------------------------------------------
When it comes to loops, I also remember that I once did a few silly things.

At that time, although I knew the function of &, I didn't think that & could also play a role in echo.

There was a file backup.bat recorded.
Because there was a sentence in it.

echo Thank you for using, & backup
As a result, this script was called infinitely.

Later, I found out that it could be like this...
I also remember that because I didn't use the del command well.

I deleted all the things on the C drive.
知,不觉多。不知,乃求知
Floor 11 Posted 2007-04-23 13:27 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
Swe sweat...

Sympathize. I remember once I used the rd command to delete all the movies I downloaded, they were gone without even watching, and I was depressed for several days...
Forum Jump: