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-08-03 18:16
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » What's wrong with this batch file View 729 Replies 5
Original Poster Posted 2007-03-17 00:02 ·  中国 北京 电信
初级用户
★★
Credits 122
Posts 54
Joined 2006-11-03 04:24
19-year member
UID 69380
Gender Male
Status Offline
for /f %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do (del %%i:\*.tmp /f/q/s)
pause

It gives the following error:

D:\test>for /F %i in (c d e f g h i j k l m n o p q r s t u v w x y z') do del %
i:\*.tmp /f/q/s
The system cannot find file c。

D:\test>pause
Press any key to continue. . .

[ Last edited by jasonwang on 2007-3-17 at 12:05 AM ]
Floor 2 Posted 2007-03-17 00:09 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
/f is unnecessary
Floor 3 Posted 2007-03-17 00:26 ·  中国 北京 电信
初级用户
★★
Credits 122
Posts 54
Joined 2006-11-03 04:24
19-year member
UID 69380
Gender Male
Status Offline
That's not the cause of the error, right?
Floor 4 Posted 2007-03-17 01:11 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  The poster in reply #2 is correct.
Floor 5 Posted 2007-03-17 04:07 ·  中国 浙江 丽水 松阳县 电信
初级用户
Credits 39
Posts 20
Joined 2007-01-24 01:56
19-year member
UID 77471
Gender Male
Status Offline
Take a look at how the f parameter is used
Floor 6 Posted 2007-03-17 04:25 ·  中国 浙江 宁波 电信
中级用户
★★
Credits 385
Posts 156
Joined 2007-01-19 02:32
19-year member
UID 76955
Gender Male
Status Offline
What does the /F parameter mean??? Please explain it, I want to know too
Forum Jump: