中国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-08-19 01:21
47,814 topics / 349,908 posts / today 1 new / 48,259 members
DOS疑难解答 & 问题讨论 (解答室) » "for /f %a in (TODEL.txt) do del %a" gives a "syntax error" error.
Printable Version  950 / 5
Floor1 dkaw Posted 2007-09-29 10:42
新手上路 Posts 8 Credits 18
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!
Floor2 lxmxn Posted 2007-09-29 12:00
版主 Posts 4,938 Credits 11,386
What is the runtime environment?
Floor3 dkaw Posted 2007-09-29 12:17
新手上路 Posts 8 Credits 18
MS-DOS 7.1, with IFS loaded, supporting NTFS read/write.
I want to make a small program to delete viruses under DOS.
Floor4 wudixin96 Posted 2007-09-29 12:30
银牌会员 Posts 931 Credits 1,928
Pure DOS environment

I don't think for has a /f switch.
Floor5 yqi99 Posted 2007-09-29 12:49
初级用户 Posts 51 Credits 108
The pure DOS for is just too weak... really depressing
Who can make an enhanced one, hehe
Floor6 dkaw Posted 2007-09-29 14:26
新手上路 Posts 8 Credits 18
Thanks everyone for the support. Looks like I'll have to think of some other way.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023