Are you facing problem to delete any file or folder with Access Denied or some files are showing can’t be deleted? You can now delete all the files and folders easily using cmd. The files which are corrupted or not in the right format, it may not delete. At the same time, some virus on the file can also stop to delete a file in Windows 10, 8/8.1 or Windows 7.
With this in mind, you need to delete the file to free up some space or staying in the safe position. I will share the methods of eliminating the file or folder using cmd or Command Prompt. It will ensure successful deleting/erasing of your file or folders instantly within seconds.
Do you really want to delete the file or folders permanently which is showing can’t be deleted or access denied, come to me and start deleting it by using cmd? Are you ready to get it now? Let’s get the tips for erasing the files or folders from Windows 10, 8, 8.1 or Windows 7.
How to Delete any File Using cmd (Command Prompt):
When you are trying to delete any file from your Windows Computer, it may not sometimes delete for unwanted reasons. But if you want to remove it permanently and you are sure, you can do it by using Command Promot or cmd. Let’s see how do you do it.
Step 01: Open cmd first from the Windows Start Menu or by searching on the search section.
Step 02: Now select which file from which Drive/folder you want to delete. For this, you have to choose the drive first. I will show you deleting a file from the desktop. So I will give the command to the desktop. The Command: cd desktop
Then Again I am telling you will provide the name of your desired Drive and Folder
Step 03: Now you have selected from which you will delete the File. Now write the below code
I have a file name TechyPi.txt and I wanted to delete it from my desktop, so I have written the Command. You will give the file name of yours you want to erase.
Hope you have done it successfully. See the above screenshot to understand it better.
How to Delete any Folders using cmd (Command Line):
Now we will see how you can delete the folders from the Windows computers which are showing access denied or can’t be deleted. Yes! You can easily delete the folders from your Windows 10, 8/8.1 or Windows Computer by Command Prompt or cmd. Let’s follow the steps to do it carefully.
Step 01: First Open the Command Prompt or cmd from the Windows Start Icon.
Step 02: Now at the same process of deleting the files, you have to choose the drive first where you want to delete the folders. For this write cd Desktop. As I will delete a folder from the desktop, I have written it. If you want to delete from some others drive, select it, please.
Step 03: Now Type rd TechyPi /s Yes! It is the command. As I want to delete a folder which name is TechyPi, so I have typed it. You will give the name of your desired folders you want to delete.
Step 03: Now it will show a message to you like That “TechyPi, Are you sure (Y/N)?” That means you have to type Y for Yes and N for No. As you want to delete the folders type Y.
Step 04: Press Enter now and see the folder has gone from the drive. See the Screenshot to understand it clearly.
I think you have successfully deleted the folder from your PC. You can delete more than one folder by following this method. It is no matter if it is access denied folders or Can’t be deleted. You will not find it even the Recycle Bin.
Note: You can delete/erase the file or folders by following this method from any of your Windows version including Windows 7, 8/8.1 or Windows 10.
Editors Note From TechyPi:
I hope you have realized the Tutorial and you can delete the files and folders from your Windows PC which was access denied file or showing Can’t be deleted.
If you get the article helpful, express your love by sharing it on your favorite social media. Never hesitate to comment on any further needs. All the best wishes.