banner



How To Delete Windows Folder From Another Drive

Windows 10 logo

If yous prefer command-line methods, Windows x offers a couple of commands to assistance you delete your files and folders from a Command Prompt window. We'll show you how to perform this deletion.

Delete Files with Command Prompt on Windows 10

To delete files (non folders) from Command Prompt on Windows ten, you can use the built-in del command. This command helps yous remove the specified files from your PC.

Warning: Know that the del command deletes the specified file without moving it to the Recycle Bin. This means you can't retrieve your file one time it's been deleted.

To use it, showtime, open Command Prompt. Practise this by opening the Get-go menu, searching for "Control Prompt", and clicking "Run as Ambassador" on the right of the search results.

Select "Run as administrator" for Command Prompt in Windows 10's Start menu.

In the "User Account Control" prompt that appears, click "Yep."

Y'all now have a Control Prompt window open. Here, blazon the post-obit control, replacing PATH with the full path to the file you want to delete. And then press Enter.

del PATH

For example, to delete a file named "MyFile.txt" placed on your desktop, use the following command replacing username with your own username:

del "C:\Users\username\Desktop\MyFile.txt"

Use the "del" command to delete a file from Command Prompt.

And your specified file is now deleted from your storage!

To customize your deletion procedure, you can use a couple of parameters that the del command offers.

For instance, you lot can add the /p parameter to the command to get Control Prompt to ask for your confirmation before deleting a file. Similarly, yous tin add together the /f parameter to the command to force delete your read-only files.

Here'due south what the above command looks like when paired with the /p parameter:

del /p "C:\Users\username\Desktop\MyFile.txt"

Use the "del /p" command to delete a file with a prompt from Command Prompt.

Delete Folders with Control Prompt on Windows 10

To delete folders (also called directories) on your PC, use Windows' built-in rmdir command. This control helps y'all delete folders as well as their subfolders and the files inside them.

Warning: Know that the rmdir command removes folders without moving them to the Recycle Bin. Y'all can't restore your folders once they have been deleted with this command.

To use this control, open a Command Prompt window. Practice this by opening the Start menu, searching for "Command Prompt", and clicking "Run as Ambassador" on the correct of the search results.

Select "Run as administrator" for Command Prompt in Windows 10's Start menu.

In the Command Prompt window that opens, blazon the following command replacing PATH with the full path to the folder you desire to delete. And so press Enter.

Note: Make sure that the folder yous're deleting doesn't contain any files or folders. If the folder is not empty, utilise the 2d command given below to delete your binder.
rmdir PATH

For case, to delete a folder named "MyFolder" on your desktop, utilise the following command replacing username with your own username:

rmdir "C:\Users\username\Desktop\MyFolder"

Use the "rmdir" command to delete a folder from Command Prompt.

And the command volition become the specified folder removed from your PC!

If the folder you desire to delete contains any files or folders in it, add the /due south parameter to the command and this will remove your folder including all its subfolders and files inside them.

rmdir /s "C:\Users\username\Desktop\MyFolder"

Use the "rmdir /s" command to delete a folder and all its subfolders and files from Command Prompt.

And that'due south all.

Various Uses of the Del Control

With the del control, you lot tin can apply your inventiveness to delete your files in various ways. For example, you tin can remove certain types of files, remove only the files that accept a certain word in their names, and so on.

For example, to delete all the PNG files in your current binder in Command Prompt, you can utilise the post-obit command:

Tip: Feel costless to supersede ".png" with whatever file extension you want to delete.
del *.png

Delete certain file types with the "del" command from Command Prompt.

This command selects all PNG files in the current folder and deletes them.

Another creative use of the del command is to delete files that incorporate a certain discussion in their names. For case, to delete all files whose names outset with "word", y'all'd use the following command:

Tip: Add together the asterisk earlier the word to delete all files that finish with your specified discussion.
del "word*"

Use the "del" command to delete files with certain words from Command Prompt.

Finally, if you'd like to remove all files from the current folder, use the following command:

del *.*

Use the "del" command to delete all files in a folder from Command Prompt.

And that's how yous delete files and folders with Control Prompt. Very handy!

Deleting files with these methods is certainly not equally intuitive as using the graphical methods, but it'southward expert to have these methods just in instance you lot need them.


On a related notation, did you know y'all tin can make Windows skip the Recycle Bin while deleting files?

RELATED: How to Skip the Recycle Bin for Deleting Files on Windows 10

Source: https://www.howtogeek.com/742224/how-to-delete-files-and-folders-using-command-prompt-on-windows-10/

Posted by: layneacket1982.blogspot.com

0 Response to "How To Delete Windows Folder From Another Drive"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel