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联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » The Strongest DOS Command – for (It is a good resource for novices to learn the FOR statement)
View 53,116 Replies 259
Credits 24 Posts 11 Joined 2008-09-17 23:25 17-year member UID 125908 Gender Male
Status Offline
The statement: for /r . %a in (*.txt) do @find "bluebear" %a needs to be corrected:
for /r %a in (*.txt) do find "bluebear" %a
With the statement written by the original poster, it can't be executed. Please verify.
Credits 26 Posts 12 Joined 2008-09-29 21:37 17-year member UID 127030 Gender Male
Status Offline
Originally posted by youlangyu at 2008-9-19 11:03:
for /r . %a in (*.txt) do @find "bluebear" %a
This statement needs to be corrected:
for /r %a in (*.txt) do find "bluebear" %a
With the statement written by the original poster, it cannot be executed. Please verify.
No need to correct, it can run and works normally in the cmd of XP. The "@" can be omitted. C:\22>for /r . %a in (*.txt) do @find "qwert" %a
Credits 61 Posts 39 Joined 2007-03-22 16:49 19-year member UID 82575 Gender Male From come from hb--wh
Status Offline
In batch processing, the FOR command is really very powerful. Hehe~~ I just suddenly had an epiphany and understood this damn tokens parameter command.. The post is very detailed.. Support````