
The batch file example requires you to know which folder you want to delete files in. Right-click your desktop and head to New > Text Document. Then input "del " and press Enter.įor this example, I'm going to delete the MUO Batch Rename folder created for the earlier examples. The basic command locates the specified folder, while the /s parameter will delete all files contained in the directory subfolders, and the /f parameter ignores any read-only settings.Īlternatively, head to the folder containing the files you want to delete, hit Shift + Right Click, and select Open a command window here. To delete a single file, use the following command: del C:\enter\your\path\here /f /s If you point it at something critical, you could break your operating system. It removes entire directories, including file structures and everything in-between. You can add parameters to both commands to delete and remove specific types of files or to simply remove everything.įair warning, the rmdir command is powerful and potentially dangerous.

The Command Prompt has two powerful file removal commands at its disposal: DEL and rmdir.ĭEL is fairly self-explanatory as the command to delete a file, while rmdir is the command to remove an entire directory. Batch Delete Files Using the Command Prompt When it comes to batch deleting files on Windows 10, you have a few options. The Windows PowerShell offers the most flexibility for batch renaming files and is the most powerful renaming tool built into Windows. The following command renames all file extensions from text documents to rich text format documents: ren *.txt *.rtfīefore swapping out file extensions, I recommend taking a backup of the files just in case something goes wrong. That means you can attempt to rename files to similar file types, such as a Word document (.docx) to a text document (.txt), but you'll run into issues if you attempt to convert a Word document into a video type (such as. While this is handy, it can cause issues if you rename it to an incompatible file type. That means you can batch rename file extensions.

The ren command can also address file extensions. You can remove the "-budget" suffix using the following command: ren ?-budget.xlsx ?.xlsx
#Microsoft windows batch file rename series#
Say you have a series of documents named "jan-budget.xlsx," "feb-budget.xlsx," "mar-budget.xlsx," and so on. You can use batch file renaming to delete part of a filename, too.
