中国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-09 03:14
47,811 topics / 349,895 posts / today 0 new / 48,253 members
DOS批处理 & 脚本技术(批处理室) » How to use P to delete $NtUninstallKB873339$
Printable Version  4,001 / 15
Floor1 guigui Posted 2008-06-29 20:51
初级用户 Posts 48 Credits 102
How to use P to delete a large number of $NtUninstallKB873339$ $NtUninstallKB886185$ and other patch update files in the Windows directory??? I have tried $*$ but it didn't work

[ Last edited by guigui on 2008-6-29 at 09:04 PM ]
Floor2 dslz666 Posted 2008-06-30 03:26
中级用户 Posts 117 Credits 233
cd /D %windir%
attrib -r -s -h c:$*$ /s /d
for /d %%d in (c:$*$) do rd "%%d" /s /q
Try this way
Floor3 guigui Posted 2008-07-01 21:54
初级用户 Posts 48 Credits 102
It doesn't work. It flashes and then disappears. Is there really no way???
Floor4 HAT Posted 2008-07-01 22:15
版主 Posts 5,017 Credits 9,023
Run it in the command line interpreter and paste the result here.
Floor5 moniuming Posted 2008-07-01 22:18
银牌会员 Posts 574 Credits 1,335 From 广西
Paste the following code into the command prompt and run it to see. If there are no error messages, it means the deletion was successful.
Floor6 guigui Posted 2008-07-01 23:02
初级用户 Posts 48 Credits 102
I followed the P processing done by the elder brother upstairs, but there were no error messages reported, and the files were all there. I directly copied and ran it in CMD.
Floor7 HAT Posted 2008-07-01 23:10
版主 Posts 5,017 Credits 9,023
What about this?
Floor8 terse Posted 2008-07-02 01:17
银牌会员 Posts 946 Credits 2,404
What about dir /a-d /b + del?
Floor9 guigui Posted 2008-07-02 10:24
初级用户 Posts 48 Credits 102
Brother HAT, it seems to be successful, but why does it work directly in CMD? When I copy the command to a.BAT and run it, it just flashes by and the file isn't deleted? I've tried it several times and it's like this.
Floor10 sylovanas Posted 2008-07-02 10:29
初级用户 Posts 42 Credits 107
Originally posted by guigui at 2008-7-2 10:24 AM:
HAT大哥 It seems to be successful, but why does it work directly in CMD? When the command is copied into a .BAT and run, it just flashes by and the file isn't deleted? I've tried several times and it's like this.



bat %a should be changed to %%a
Floor11 HAT Posted 2008-07-02 10:31
版主 Posts 5,017 Credits 9,023
Learn to read help as soon as possible

Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.

C:\Test>for /?
Runs a specified command for each file in a set of files.

FOR %variable IN (set) DO command

%variable Specifies a single letter replaceable parameter.
(set) Specifies a set of one or more files. Wildcards may be used.
command Specifies the command to carry out for each file.
command-parameters
Specifies parameters or switches for the specified command.

To use the FOR command in a batch program, specify %%variable instead
of %variable.
Variable names are case sensitive, so %i is different
from %I.
Floor12 guigui Posted 2008-07-02 10:32
初级用户 Posts 48 Credits 102
Floor13 guigui Posted 2008-07-04 10:18
初级用户 Posts 48 Credits 102
I'm still so stupid. I've been trying in the.bat and it just doesn't work. It always flashes by. Hey, it seems I still need to study more. Still, I need to trouble some big brother to write one for me?
Floor14 HAT Posted 2008-07-04 10:47
版主 Posts 5,017 Credits 9,023
```
for /f %%a in ('dir /ad /b "%systemroot%\$*$"') do rd /s /q "%systemroot%\%%a"
```

Save the code as C:\test.bat
Start, Run, cmd, C:\test.bat
Paste the result here to have a look
Floor15 guigui Posted 2008-07-04 11:46
初级用户 Posts 48 Credits 102
It worked out. Haha. But at that time I wrote it exactly like that, the same command as Brother HAT, but why did it flash by? Then I newly created a test.bat and then copied the command in again and it worked. Oh my, what's the situation here?
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023