![]() |
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-09-13 22:58 |
47,812 topics / 349,916 posts / today 0 new / 48,268 members |
| 论坛回收站 » Questions in Batch Script |
| Printable Version 1,992 / 1 |
| Floor1 chencunbo | Posted 2009-11-16 21:56 |
| 新手上路 Posts 5 Credits 7 | |
|
### 1, What is the role of modifying the ACL with Cacls?
The role of using `Cacls %1 /c /t /p Everyone:f` is to take ownership and grant full control permissions to the `Everyone` group for the file or directory specified by `%1`. This is to ensure that the file or directory can be deleted later because sometimes files or directories have restricted permissions that prevent normal deletion. ### 2, When dragging to the batch file, is it equivalent to using %1 to replace the path of the file to be deleted? Yes, when you drag a file to the batch file, `%1` is indeed used to substitute the path of the file that is dragged. ### 3, What is the significance of the slashes in `\\?\%1` In the path `\\?\%1`, the double slashes at the beginning are part of the Windows long - path syntax. The `\\?\` prefix is used to enable the use of long paths that exceed the normal maximum path length limit in Windows. It allows the operating system to handle paths that are longer than the traditional 260 - character limit. |
|
| Floor2 longong | Posted 2009-11-17 02:24 |
| 新手上路 Posts 4 Credits 4 | |
|
Not all files can be deleted.
1. Modify the ACL with cacls, which should modify the access permissions in the ACL data packet. Sometimes when we delete a file, if the program in that file is being used by the computer. Then the computer will prompt us that the file is not in use or write-protected. This batch processing is to delete those files (virus files) that the computer is using but we can't close manually. As long as we change the permissions of the ACL data packet information, we can delete the file. 2. Yes 3. \\? wildcard \\ is precise ? is any character \\? combined, that is, precise to any character When dragging the file to be deleted to this batch processing, it replaces "?" |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |