![]() |
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-08 02:44 |
48,041 topics / 350,128 posts / today 3 new / 48,253 members |
| DOS批处理 & 脚本技术(批处理室) » Question about using the for command |
| Printable Version 658 / 4 |
| Floor1 lena | Posted 2008-04-10 23:22 |
| 初级用户 Posts 67 Credits 154 | |
|
echo c:\>%temp%/tempdu.txt
echo d:\>>%temp%/tempdu.txt echo e:\>>%temp%/tempdu.txt echo f:\>>%temp%/tempdu.txt for /F %%i in (%temp%/tempdu.txt) do attrib -s -r -s -h "%%i*.* for /F %%i in (%temp%/tempdu.txt) do del /f /q %iautorun.inf Because the computer got infected with a batch file virus, I want to delete it. It has infected several of my LAN machines, so I'm asking everyone for help. Especially with the FOR command: %%i is defined in front, but after DO, if it is treated as a variable, how should it be used? After running it, it always says ""The parameter format is incorrect"" And also the RD command. rd "%windir%\Fonts\solasetup" This still can't run either. |
|
| Floor2 moniuming | Posted 2008-04-10 23:51 |
| 银牌会员 Posts 574 Credits 1,335 From 广西 | |
| Floor3 moniuming | Posted 2008-04-10 23:54 |
| 银牌会员 Posts 574 Credits 1,335 From 广西 | |
|
When using the rd command, it cannot delete a non-empty directory unless you use the /s /q parameters
rd /? |
|
| Floor4 lena | Posted 2008-04-11 00:12 |
| 初级用户 Posts 67 Credits 154 | |
|
One more question, how should I delete a folder that contains files./
|
|
| Floor5 HAT | Posted 2008-04-11 04:51 |
| 版主 Posts 5,017 Credits 9,023 | |
Originally posted by lena at 2008-4-11 12:12 AM: Wasn't that already answered in post #3? RD Microsoft Windows XP |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |