In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to use cmd to forcibly delete folders". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In cmd, you can use the "rd/s/q drive letter:\ a folder" command to force the deletion of a folder. Just open cmd, enter the "rd/s/q drive letter:\ a folder" command, and press the enter key on the keyboard to force the deletion of the specified folder.
The operating environment of this tutorial: windows7 system, Dell G3 computer.
Delete file or directory CMD command:
Rd/s/q drive letter:\ a folder (forcibly deletes the file folder and all files in the folder)
Del/f/s/q drive letter:\ file name (force deletion of file, file name must be suffixed with file name)
Delete file or directory BAT command:
1. Enter the following command to create a new .bat batch file, then drag and drop the file you want to delete onto the batch file icon to delete it.
DEL / F / A / Q
RD / S / Q
Third, force the deletion of tool software recommendations:
1. Green Eagle File unlock deleter FileSuperDelete
2 、 PowerTool.exe
3 、 Unlocker 1.8.7
In the Windows system, we will inevitably encounter the situation that files cannot be deleted by conventional methods. Users who use Windows XP systems, in particular, encounter such problems more frequently. In order to solve the user's confusion, we will try to delete those stubborn files effectively through a variety of unconventional means.
I. the conventional method of deleting stubborn files
1. After restarting the Windows operating system, delete the files as usual.
two。 Delete it with commands such as Del or Deltree in the DOS (or command prompt) interface.
3. Delete using third-party tools that are not Windows explorer, such as Total Commander, ACDSee, FlashFXP, Nero, etc., which have the function of browsing folders.
4. If you have more than two operating systems installed, you can delete files from other operating systems in the current system.
5. Press F8 at startup to select safe mode to perform the delete operation.
Next, we will make a specific analysis of specific problems and introduce you to the unconventional methods that should be taken when files cannot be deleted for various reasons.
Delete files that are in use by other programs
Performance of the problem:
In the Windows XP system, you are ready to delete a large-capacity AVI file, but the system always prompts you that the deletion operation cannot be performed, and other programs are in use, even when you just boot into the Windows system.
Problem solving:
Method 1: open notepad, click the menu bar "File" → "Save as", named file and you want to delete the same file name (including extension), and then replace, you will find that the capacity has changed to 0 KB. At this point, execute the delete command.
Method 2: create a new folder in the same directory as that AVI file, and then restart it. Now, instead of selecting the AVI file, select the folder you just created, and then press Ctrl + the AVI file to delete it.
Method 3: change the extension of the AVI file to any other invalid file type, and then delete it.
Method 4: one way to do this once and for all is to disable Windows XP's media preview function, click "start" → "run", type: "CMD" and enter enter. Then enter: regsvr32 / u shmedia.dll at the Command prompt window
Enter to confirm the operation will uninstall the preview function of the video file. Later, when you need to restore the video file preview function, enter the regsvr32 shmedia.dll command in the Command prompt.
Method 5: start the media player that played the AVI file and open another file. After that, try to delete it again.
Method 6: use the WinRAR program to delete, right-click the AVI file, select "add to compressed file" in the pop-up menu, and then select the "delete source file after compression" check box in the "General" tab of the pop-up window. After confirming the operation, perform the compression operation. Finally, delete the compressed file.
Method 7: call up the Windows Task Manager and choose to end the Explorer process, but do not close the window at this time. At this time, it will be like a crash. We switch to the "applications" tab, click the "New Task" button, enter Explorer.exe, and confirm the action. After that, the desktop is back to normal again, and then delete operation can be performed.
Third, cleverly delete "non-empty folders" or "bad files"
Performance of the problem:
Under the Windows XP system (NTFS partition format), the specified file cannot be deleted either in the resource manager or with a third-party tool, for example, if you delete it with Total Commander, you will first prompt that the folder is not empty, and there will be no response after confirmation. Even if you start with a DOS disk and load a read-write version of ntfs for dos pro, you can't delete it. The prompt is "bad file name", but you can see the folder.
Problem solving:
Files in this case cannot be deleted, most likely due to long file names in NTFS format. We can use the 8.3 format to reduce the length or change some directory names in the path to reduce the length of the path. For example, you can temporarily rename some directories in the path, or use the 8.3 format in command line mode. For example, the directory of "Linux Faq" becomes "LINUXF~1", and you can enter the directory through "Linuxf~1". After that, you can use the Del command to delete the specified file. If you need to delete a directory, use the Rd command.
4. Cleverly delete files that "specified programs or files are in use"
Performance of the problem:
When you delete a file, the system prompts you in a pop-up dialog that the specified program or file is in use and cannot be deleted.
Problem solving:
Method 1: for such cases, we can solve the problem by ending the process of pre-deleting files. So how do you know which processes the specified file is associated with? You can use the WhoLockMe gadget to find out. Let's run "Install.exe" to install the program first.
Next, enter the directory where the pre-deleted file is located, right-click the file, and select "Who Lock Me?" from the pop-up menu.
A "Lockers" window pops up, where we can learn about all current processes that are calling the file.
After selecting the process name, click the "Kill Process" button, pop up the "Kill-Confirmation" dialog box, and click the "Yes" button here to confirm the end of the process operation. After you have finished all the corresponding processes, you can delete the specified file in the normal way.
Tip: in fact, this method is especially suitable for deleting Trojan servers, which can only be deleted after blocking all processes related to it.
Method 2: if the DLL dynamic link library file called by the specified program or file is not released in memory, it will also prompt that the file is in use when deleted. In this case, we can delete the system page file in the DOS environment, the "WIN386.SWP" file (located in the Windows directory of the system disk) in the Windows 9X system and the "pagefile.sys" file (located in the root directory of the system disk) in the Windows 2000/XP system.
Method 3: if the virus firewall resides in the system, and it is checking the file you are about to delete when scanning for virus, then the system will also prompt that the file is in use. At this point, we only need to pause the real-time monitoring operation.
Fifth, cleverly delete other types of strange files
1. File cannot be deleted due to user permission problem
If the current Windows login does not have permission to delete the specified files / folders (for the Windows NT/2000/XP/2003 operating system), simply log in as an administrator again.
two。 Illegal characters prevent files or folders from being deleted
If the file or folder cannot be deleted due to illegal characters, you can enter the directory where you want to delete the file in the "Command prompt" interface, enter "dir > del.bat", use the DOS pipe command to automatically input the list of files in the current directory into the batch command file "del.bat", and then modify the batch command file to keep only the file or directory name. Add "del" or "rd" to the name of the file or directory, and then run the batch command to delete it.
3. Unable to delete any files in the system
Check to see if anti-deletion protection software is installed in the system, and if so, delete it.
This is the end of "how to use cmd to forcibly delete a folder". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.