A small partner asked whether some files with long names on the computer couldn't be deleted due to a virus. Xiao Bian can confidently say no! This is because the default character limit in the Windows system is 255 characters. If a file name exceeds this limit, it becomes impossible to move, copy, delete, or even run the file.
To delete such files, it's actually quite simple. You can use third-party tools like file shredders or advanced file management software. However, to avoid confusion, I won’t recommend any specific third-party tools here. Instead, I’ll share a built-in trick that works perfectly.
Here’s what you can do: create a new text file and paste the following code into it:
DEL /F /A /Q \\?\%1 RD /S /Q \\?\%1
Then, change the file extension from .txt to .bat. After that, simply drag and drop the problematic files onto this batch file, and they will be deleted quickly.
Another useful method is using compression software. Right-click on the file, select "Add to Compressed File," and check the option to "Delete the original file after compression." This way, you can also remove those stubborn files efficiently.
This is a handy trick I stumbled upon by accident, and it's definitely practical for anyone facing similar issues. Give it a try next time you encounter long file names that won't delete!
Ev Charging Solutions,Home Car Charger,Ev Charging Box,Ev Charging Home Stations
EMoreShare International Trade (Suzhou) Co., Ltd , https://www.emoreshare.com