The server is uploaded with backdoors and files and folders cannot be deleted. This article will solve the following problems:
1. You cannot delete or open folders that are not accepted by Windows naming.
2. After the folder name is changed, a file named normally cannot be deleted.
3. Delete the folder named by NUL
4. the folder name is followed by. (A dot), which tells you how to delete it (reference an unavailable location)
In the last few days, I want to copy the website and make some modifications. When I copy the website, the website cannot be copied. After troubleshooting, I found that several folders were uploaded with backdoors, and the folder name is ASDF 'sdf. dd format, 'and. it is a character that is not accepted by Windows folders, so it may be difficult to delete it,
After searching for information on the Internet, you can use the CMD command to delete the file. The solution is to display the short file name in the "8.3" format. End of 1"
Solution:
Run-> CMD and run the CD command to go to the directory of the folder that cannot be deleted. Enter DIR/X/A (/X indicates that the file name is displayed in 8.3 format, /A is to show hidden files.) The penultimate column is his short file name, we can directly run the "del short file name" command to delete the con. ASP file I know the problem is coming again. How about renaming con. ASP does not work either. It cannot work with con. ASP file operations
Later, I saw a blog on the TV station. His solution was: Create a TXT file and write the following content in it.
Del/f/A/Q? % 1
RD/S/Q? % 1
Then, change the suffix to bat and upload it to the folder on the server. Then, drag the files that cannot be deleted to the BAT file. OK will be deleted.
To delete a NUL Folder:
In Windows, the following words cannot be used to name files/folders, including "Aux" "COM1" "com2" "PRN" "con" and "NUL, because these names belong to device names, they are equivalent to a DOS device. If we name these names in a file, Windows will mistakenly think that a duplicate name occurs, therefore, the system prompts "you cannot create a file with the same name" and so on.
However, some special methods can be used to create a folder named by these devices. For example, Run "md c: aux \" at the command prompt \", create a folder named aux on the C drive. Although this folder can be accessed or created, it cannot be deleted because Windows does not allow devices to be deleted in this way. In the system's view, this aux folder is a device.
So, how to delete such files/folders? You only need to enter the file path and file name correctly according to the complete UNC path format, that is, the path format of the network neighbor. For example, to delete the aux folder under drive C, run: RD/s \. c: aux, RD is the command for deleting folders at the command prompt. The/S parameter indicates deleting a specified file from all subdirectories. For example, to delete the nul.exe file in the temp folder of drive C, run Del \. C: tempnul.exe at the command prompt.
The folder name is followed by. (A dot), which tells you how to delete it (referencing an unavailable location)
For example, to delete the F: \ tools \ cc. folder (note, there is a dot after CC)
It is not input in DOS. It is open in Normal Mode-start → run → cmd
Enter F: Enter
Enter CD tools and press Enter.
Enter RD/S/q cc .. \ press enter (note, CC is followed by 2 points) (for example, delete the CC folder and use RD/S/q cc)
(The RD command is to delete non-empty directories,/S/Q is to delete subdirectories, silent mode)