• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to delete files and folders with CMD on Windows 10/11

AnonyViet by AnonyViet
January 26, 2023
in Tips
0

If you prefer to use the command line, Windows 10/11 will provide several commands to help you delete files and folders using Command Prompt. I will show you how to do this.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to delete files and folders using Command Prompt on Windows 10

How to delete files with CMD on Windows 10/11

If you are interested in researching about CMD, you should not miss it 27 interesting CMD tips on Windows i wrote.

To delete Files using Command Prompt on Windows 10, you can use the built-in del command. This command helps you to delete specified Files from your PC.a

Warning: The del command will delete the specified File without moving it to the Trash. This means that you cannot retrieve your File after it has been deleted.

To use the command, first open the Command Prompt. Do this by opening the Start Menu, searching for “Command Prompt” and clicking “Run as Administrator” to the right of the search results.

How to delete files and folders with CMD on Windows 10/11 12

In the “User Account Control” window, click “Yes”.

You now have a Command Prompt window open. Here, enter the following command, replacing PATH with the full path to the File you want to delete. Then press Enter.

del PATH

For example, to delete a File named “MyFile.txt” on the Desktop, use the following command to replace username with your own username:

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

How to delete Files and folders with CMD on Windows 10/11 13

And the specified File has been deleted from your memory!

To customize the deletion process, you can use a few parameters that the del command provides.

For example, you can add the /p parameter to the command so that the Command Prompt confirms your request before deleting the File. Similarly, you can add the /f parameter to the command to force delete your read-only files.

Here is the command with the /p parameter:

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

How to delete Files and folders with CMD on Windows 10/11 14

Delete folder with CMD on Windows 10

To delete folders on your PC, use the built-in rmdir command in Windows. This command helps you to delete folders as well as subfolders and files within them.

Warning: The rmdir command deletes directories without moving them to the Recycle Bin. You cannot restore your folders once they have been deleted with this command.

To use this command, open a Command Prompt window. Do this by opening the Start Menu, finding “Command Prompt” and clicking “Run as Administrator” to the right of the search results.

How to delete Files and folders with CMD on Windows 10/11 15

In the Command Prompt window, enter the following command replacing PATH with the full path to the directory you want to delete. Then press Enter.

Note: Make sure that the folder you are deleting does not contain any Files or folders. If the folder is not empty, use the second command given below to delete your folder.

rmdir PATH

For example, to delete a folder named “MyFolder” on the Desktop, use the following command to replace username with your own username:

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

How to delete files and folders with CMD on Windows 10/11 16

And the command will delete the specified folder from your PC!

If the directory you want to delete contains any files or directories in it, add the /s parameter to the command and this will delete all subdirectories and files inside that directory.

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

How to delete Files and folders with CMD on Windows 10/11 17

Different uses of the Del . command

With the del command, you can use your creativity to delete files in a variety of ways. For example, you can delete certain types of files, delete only files with a certain word in their name, etc.

For example, to delete all PNG files in your current directory in Command Prompt, you can use the following command:

Tip: Replace “.png” with whatever File extension you want to remove.

del *.png

How to delete files and folders with CMD on Windows 10/11

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

Another creative use of the del command is to delete files that contain a certain word in their name. For example, to delete all files whose name starts with “word”, you would use the following command:

Tip: Add an asterisk before the word to remove all Files ending with your specified word.

del "word*"

How to delete files and folders with CMD on Windows 10/11 19

Finally, if you want to delete all files from the current directory, use the following command:

del *.*

How to delete files and folders with CMD on Windows 10/11 20

And that’s how you delete files and folders using CMD. Very handy!

Deleting files using these methods is certainly not as intuitive as using graphical software, but you can still use this method like cmd.

In addition, you can also use CMD to increase internet speed here.

The article achieved: 5/5 – (100 votes)

Tags: CMDdeletefilesfoldersWindows
Previous Post

Lesson 87: How to center content when printing in Excel

Next Post

Create NameCheap Stellar Hosting for 1 Month for Free

AnonyViet

AnonyViet

Related Posts

Top 5 game programming languages ​​to learn now
Tips

Top 5 game programming languages ​​to learn now

June 8, 2025
[Godot Shooter] #2: Creating characters & shooting bullets
Tips

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025
What do you need to learn game programming? Is it difficult? How long does it take?
Tips

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
Instructions for registering chatgpt team at $ 1
Tips

Instructions for registering chatgpt team at $ 1

June 5, 2025
How to engrave the right mouse menu error on Windows
Tips

How to engrave the right mouse menu error on Windows

June 5, 2025
How to create online meme photos is very easy with a few steps
Tips

How to create online meme photos is very easy with a few steps

June 5, 2025
Next Post
Create NameCheap Stellar Hosting for 1 Month for Free

Create NameCheap Stellar Hosting for 1 Month for Free

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Top 5 game programming languages ​​to learn now

Top 5 game programming languages ​​to learn now

June 8, 2025
The iPhone list is updated with iOS 26

The iPhone list is updated with iOS 26

June 8, 2025
Discover the glowing effect next to the iPhone ios 18 screen

Discover the glowing effect next to the iPhone ios 18 screen

June 8, 2025
[Godot Shooter] #2: Creating characters & shooting bullets

[Godot Shooter] #2: Creating characters & shooting bullets

June 7, 2025
Top 5 game programming languages ​​to learn now

Top 5 game programming languages ​​to learn now

June 8, 2025
The iPhone list is updated with iOS 26

The iPhone list is updated with iOS 26

June 8, 2025
Discover the glowing effect next to the iPhone ios 18 screen

Discover the glowing effect next to the iPhone ios 18 screen

June 8, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Top 5 game programming languages ​​to learn now

Top 5 game programming languages ​​to learn now

June 8, 2025
The iPhone list is updated with iOS 26

The iPhone list is updated with iOS 26

June 8, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply