Batch processing for completely deleting 0 KB stubborn files or folders


Today, my colleague’s desktop has a hidden file of 0KB, which can’t be deleted alive or dead. When deleting, I always remind you that you can’t delete files, read source files or disks. It’s very strange. It’s poisoning. I don’t think so. The antivirus software can’t detect any poisoning. It’s really worthless to reinstall the system for this matter. After research, the problem is finally solved and shared.

1. Copy the following code into Notepad and save it as a. bat file, such as HTMer_Del.bat.

Copy codeThe code is as follows:
color 0a
Are echo sure you want to try deletion? Press any key to confirm deletion, and close the window to exit.
pause >nul
taskkill /f /im explorer.exe>nul
echo y|Cacls %* /c /t /p Everyone:f >nul
DEL /F/A/Q \\?\%*
RD /S /Q \\?\%*
start %windir%\explorer.exe

2. Drag a file or folder that cannot be deleted onto this HTMer_Del.bat. At this time, you will be prompted whether to delete it. If you want to delete it, press any key, or if you don’t want to delete the closed window.

Recommended Today

Java atomicinteger class using

A counter For ordinary variables, when multithreading operations are involved, classic thread safety problems will be encountered. Consider the following code: private static final int TEST_THREAD_COUNT = 100; private static int counter = 0; public static void main(String[] args) { final CountDownLatch latch = new CountDownLatch(TEST_THREAD_COUNT); Thread[] threads = new Thread[TEST_THREAD_COUNT]; for (int i = […]