Batch processing for completely deleting 0 KB stubborn files or folders

Time:2019-9-10

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:
@ECHO OFF
CLS
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
exit

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.