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-08 01:20
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Managing what students upload to the FTP! But an error occurs!! View 518 Replies 2
Original Poster Posted 2008-03-05 12:09 ·  中国 江苏 南京 联通
新手上路
Credits 14
Posts 5
Joined 2007-12-26 13:02
18-year member
UID 106824
Gender Male
Status Offline
Floor 2 Posted 2008-03-05 14:43 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
for /f "delims=%file%" %%a in (aa1.txt) do echo del /f /s %%a%file%>>b.txt

=====================

You shouldn't use the file extension as the delimiter characters

There is a passage like this in the help for the for command:
FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k

would parse each line in myfile.txt, ignoring lines that begin with
a semicolon, passing the 2nd and 3rd token from each line to the for
body, with tokens delimited by commas and/or spaces. Notice the for
body statements reference %i to get the 2nd token, %j to get the
3rd token, and %k to get all remaining tokens after the 3rd. For
file names that contain spaces, you need to quote the filenames with
double quotes. In order to use double quotes in this manner, you also
need to use the usebackq option, otherwise the double quotes will be
interpreted as defining a literal string to parse.
Floor 3 Posted 2008-04-01 21:38 ·  中国 江苏 苏州 电信
初级用户
Credits 44
Posts 18
Joined 2008-03-30 13:48
18-year member
UID 114439
Gender Male
Status Offline
So how do I solve it?
Forum Jump: