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-01 18:21
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » "for /f %a in (TODEL.txt) do del %a" gives a "syntax error" error. View 906 Replies 5
Original Poster Posted 2007-09-29 10:42 ·  中国 四川 成都 电信
新手上路
Credits 18
Posts 8
Joined 2007-09-28 09:21
18-year member
UID 98452
Gender Male
Status Offline
The DOS I learned was DOS 3.1 back when I was in school, so I don't know it very well. I downloaded a batch file guide from the forum, and I was very interested in this FOR command line: "for /f %a in (TODEL.txt) do del %a". But when I tried it, the system reported "syntax error".
for /f %%a in (kivifi.txt) do del %%a
for /f %a in (c:\kivifi.txt) do del %a
for /f %%a in (c:\kivifi.txt) do del %%a
All three commands above give a "syntax error". I don't know where the problem is. Please give me some pointers, experts. Thanks!
Floor 2 Posted 2007-09-29 12:00 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
What is the runtime environment?
Floor 3 Posted 2007-09-29 12:17 ·  中国 四川 成都 电信
新手上路
Credits 18
Posts 8
Joined 2007-09-28 09:21
18-year member
UID 98452
Gender Male
Status Offline
MS-DOS 7.1, with IFS loaded, supporting NTFS read/write.
I want to make a small program to delete viruses under DOS.
Floor 4 Posted 2007-09-29 12:30 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
Pure DOS environment

I don't think for has a /f switch.
Floor 5 Posted 2007-09-29 12:49 ·  中国 浙江 杭州 电信
初级用户
★★
Credits 108
Posts 51
Joined 2007-05-15 16:37
19-year member
UID 88613
Gender Male
Status Offline
The pure DOS for is just too weak... really depressing
Who can make an enhanced one, hehe
Floor 6 Posted 2007-09-29 14:26 ·  中国 四川 成都 电信
新手上路
Credits 18
Posts 8
Joined 2007-09-28 09:21
18-year member
UID 98452
Gender Male
Status Offline
Thanks everyone for the support. Looks like I'll have to think of some other way.
Forum Jump: