中国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-09-24 04:04
47,812 topics / 349,917 posts / today 0 new / 48,274 members
DOS批处理 & 脚本技术(批处理室) » Understanding the interception function of variable characters in CMD
Printable Version  25,418 / 100
Floor16 lotus516 Posted 2007-01-14 03:57
高级用户 Posts 246 Credits 551
Thanks to brother lxmxn, it has been very helpful to beginners like us!
Floor17 yesmao Posted 2007-01-14 04:22
初级用户 Posts 18 Credits 35
Passing by to learn, 3Q
Floor18 netchxing Posted 2007-01-14 12:41
初级用户 Posts 31 Credits 58 From 重庆
Floor19 wuyugui Posted 2007-01-15 23:48
初级用户 Posts 8 Credits 20
It's too complicated, I can't understand. Can you add annotations to each line? How is the calling and looping process? Please tell me. As for CALL goto :eof, I can't understand this thing. Can you explain the call goto :eof? Thank you!
Floor20 lxmxn Posted 2007-01-16 04:39
版主 Posts 4,938 Credits 11,386

  The call can invoke some external commands and internal commands, and can also invoke the label segments within the batch processing program. Here, call :print means invoking the :print program segment below this batch processing program. In addition, the call can also call the batch program segment with parameters.

  goto :eof means jumping out of this label if it is inside a label, and if it is in other positions of the batch processing program, it means jumping to the end of the batch processing program, that is, exiting the batch program.
Floor21 lbqldos Posted 2007-02-02 08:06
新手上路 Posts 7 Credits 16
Wonderful, learned something, thanks!
Floor22 lpclimber Posted 2007-03-04 22:14
初级用户 Posts 85 Credits 168
Wow, that's impressive! Need to study hard!
Floor23 qingfushuan Posted 2007-03-04 22:42
高级用户 Posts 327 Credits 502
With LZ's strength, he can definitely make another similar delay variable .bat. Eagerly looking forward to it.
Floor24 tianlijian Posted 2007-03-14 04:53
初级用户 Posts 45 Credits 120
In the batch command `echo\&pause&cls&echo.`, the backslash (`\`) here is just a literal character. In the context of a batch file, it doesn't have a special syntactic meaning like in some other programming languages. It's probably just part of the text that's being output or manipulated as part of the command sequence. So it's essentially just a character included in the string that the commands are dealing with.
Floor25 yangzhiyi Posted 2007-03-17 09:49
中级用户 Posts 123 Credits 261
Wow, so powerful, really strong. Then it jumps back later, the loop is really well done.
Floor26 HUNRYBECKY Posted 2007-03-17 11:47
银牌会员 Posts 442 Credits 1,179
Not bad. Favorite. Haven't studied this aspect in depth yet
Floor27 star8289 Posted 2007-03-22 05:01
新手上路 Posts 5 Credits 12
echo %%var:~%1,%2%% The characters after interception are: !var:~%1,%2!
-------------------This sentence is not very clear. Can you explain it in detail?
Thank you~
Floor28 enliang Posted 2007-03-22 05:16
初级用户 Posts 24 Credits 62
Newcomer, still some parts are not understandable
Floor29 lxmxn Posted 2007-03-22 07:51
版主 Posts 4,938 Credits 11,386

Re tianlijian:
The symbols such as / and ; , . \ here have the same function, indicating to output an empty line.

Re star8289:
You can analyze its function in combination with the output of the code, where %1 and %2 represent the first and second command line parameters.
Floor30 zzhh612 Posted 2007-03-25 10:06
中级用户 Posts 103 Credits 278
Can we make all batch commands into this kind of batch code with a demonstration function. But this is something that only experts can do. I hope someone interested will do this meaningful thing
Prev  1 2 3 4 57  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023