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-04 06:20
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Why does this IF usage cause an error? View 865 Replies 2
Original Poster Posted 2007-04-13 02:47 ·  中国 江西 赣州 电信
高级用户
★★
论坛上抢劫的
Credits 551
Posts 246
Joined 2006-09-21 12:35
19-year member
UID 63270
Status Offline
The code is as follows
color 4
echo Warning!!!
echo The MP4 is infected!!! The MP4 will automatically scan for viruses soon, please press Enter to continue!!!
pause>nul
set /p b=<d:\盘符.txt
for /f %%a in (d:\病毒.txt) do (
echo Is %%a this program something you copied onto the MP4?
set /p c=If yes, enter Y otherwise enter N
if %c%=="N" attrib -s -r -h %b%:\%%a&&del %b%:\%%a /q /f
pause
)
......

Why does it say attrib should not appear
Floor 2 Posted 2007-04-13 06:17 ·  中国 新疆 乌鲁木齐 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
Put it in parentheses
Floor 3 Posted 2007-04-15 05:42 ·  中国 江西 赣州 电信
高级用户
★★
论坛上抢劫的
Credits 551
Posts 246
Joined 2006-09-21 12:35
19-year member
UID 63270
Status Offline
It still errors out the same way! The same error!
Forum Jump: