Four ways to batch rename files in Windows. Bulk rename files in Windows How to rename a file so that it is readable

Most often, users rename files by right-clicking on the file, and then selecting "Rename" from the context menu. Not the most convenient option, but it has a place to be. To quickly rename a file, I recommend using the key F2.
Just select the file as usual - with the mouse or navigation "arrows" and press f2. Saves 2 actions at once with .
What if you need quickly rename multiple files?
Group renaming of files is also best done using the same button on the keyboard.

Suppose this situation - you have uploaded several photos to your computer, and the camera gives them names like "date_time" and they look like "20130316_192212". Not a very catchy title for photos.
all files in separate folder. Then, in order to rename many files (and in this case, photos):
1) Select them all with a combination of buttons ctrl+a(select all);
2) press F2 (one file will be selected, on which the cursor was);
3) write the name, for example, "how I spent the summer" and press Enter;
4) it should turn out that all files began to have the name: "how I spent the summer (1)", "how I spent the summer (2)", "how I spent the summer (3)", etc.

A slightly more complicated option is when you need to see what to rename, as well as if there are files in the folder that need to be given other names.
Then we show files by thumbnails.
In windows 7 8 it's the top right icon

In Windows XP - Folder Options - View tab

Then select the files (you can see how to do this in the article) and press F2.

Well, if you want to quickly rename files in a folder, while giving each one its own individual name, then use the navigation keys (arrows) up and down to select the file, press F2 and rename. Much easier than fiddling with a mouse.

On Windows, there are many ways to rename multiple files at once - through Explorer, Command Prompt, or PowerShell. There is a solution for fans of the graphical interface, and for those who prefer to work with commands.

Renaming through Explorer is fast, but not flexible enough. PowerShell has a lot of flexibility, but for a beginner, this method can be intimidating. And if you need a powerful graphical tool, you will have to use a third-party program.

Conductor

Explorer has a rather non-obvious way to quickly rename groups of files. First, collect all the necessary files in one folder. Switch to the "Table" (Details) view and sort the files in the required order - Explorer assigns numbers from the list starting from the top.

Select all the files you want to rename, right-click and select Rename. Enter a new name and click .

Explorer will add a number to this name for each file. A convenient way to reduce all files to the same denominator, although not very flexible.

Command line

On the command line, you can use the rename or ren command to bulk rename files. You can use the wildcard * to denote multiple files at once.

The easiest way to open a command prompt window in the desired folder is to hold down , right-click on the folder and select "Open command window" (Open command window here).

Most often, command renaming is used to change the extension of a whole group of files - this cannot be done in Explorer. The following command, for example, turns all .html files into .txt:

ren *.html *.txt

The command itself is not very functional, but it can be used in complex scenarios.

PowerShell

PowerShell offers much more options for renaming files in a command environment. With PowerShell, you can pipe the output of one command (a cmdlet, as it's called here) to another command, just like on Linux and other UNIX-like systems.

The main commands are Dir to list the files in the current folder and Rename-Item to rename an object (in this case a file). Just pipe the output of Dir to the Rename-Item command and you're done.

After starting PowerShell, use the cd command to navigate to the folder with the required files. It is best to move all the files into one folder so as not to accidentally rename too much.

Let's say we want to replace spaces in filenames with underscores.

The following command lists the files in the current folder and passes it to the Rename-Item command, which replaces all spaces with underscores.

dir | Rename-Item –NewName ( $_.name –replace “ “,”_” )

You can replace “ “ and “_” with other characters to rename files differently.

You can read more about using Rename-Item to perform more complex operations.

Third Party Utilities

If you need a powerful tool for mass file renaming, and with command line I don’t want to mess around, you can use third-party utilities, for example. True, the interface of this application is rather confusing, since it gives a lot of possibilities that are usually only achievable using regular expressions and complex commands.

After installing the application, find and highlight the files to rename.

This concept implies a group of characters (from 2 to 4), which are indicated through a dot in the file name after its name. It can be docx format Microsoft Word, jpg - one of many image formats or js - designed to store JavaScript language code, and others. The extension function is to computer understood, which program should open the required file.

How to enable extension visibility

When working with a lot of different data, type information can be useful. If their display disabled, the option can be reconfigure through the "Control Panel":

The new settings will take effect immediately and you do not need to restart your computer.

Change the extension

After the extension appears in the name, it can be changed manually. It's pretty easy to do this:

Now for reading this file will be respond program, designed to work with the format that was specified as an extension. If it suddenly turned out that the file stopped opening, this does not mean that it has deteriorated, but that the selected program cannot work with it. After all, changing the extension does not mean changing the type - this requires conversion. If everything is returned as it was, the data can again be used as before.

Using the console

This interface allows you to change all files with a specific extension in the selected directory at once. For this necessary:


When executing the command in the above illustration, all images will change their extension from .jpg to .png. The changes affect only the folder from which the configuration was made.

Saving with a different extension

It is also possible to redefine the extension with the help of some programs. For example, docx can be replaced with txt or even pdf, opening it in his native program - Microsoft Word.

In addition, this approach also involves structural changes for further correct operation.

Conversion

Extension changes is not always enough, because the internal structure of one file is different from another. For example, psd image it is forbidden reformat to jpg because it supports layers that jpg doesn't have. There are a number of other reasons, to which the standard windows solution"Photos" will report that it "Can't open the file". Here you will need specialized software, such as Photoshop. It contains conversion algorithms that allow you to change the file type to work in different applications, and the extension will be overwritten automatically.

Depending on the selected file, you may need to various software solutions for their conversion. It is worth noting separately that now there are many online converters on the network, so it is not always necessary to download heavy programs specifically for these needs.

File manager Total Commander is very popular among users of screen readers, because, along with rich functionality for working with files and directories, it has good accessibility to assistive technologies. In this article, we will explain and show with concrete examples how to use Total Commander to perform various options for bulk file renaming .

To rename a group of files, select them, either by pressing the Space key on the desired files, or by selecting all the files in the folder using the Control+A command, and press Control+M. The "Batch Rename Files" dialog will open. Special characters and commands are used to rename files in the "Batch Rename" dialog. All such symbols are square brackets.

Attention! All service characters must be entered with respect to case. For example, the [N] and [n] commands do different things.

description of dialog and commands

There are many items in the Bulk Rename dialog, but we will only need those that are directly involved in the rename.

  1. The "Name" field, here the template of the new file name without extension is indicated.
  2. The "Extension" field, the extension of the new name is specified here.
  3. The "Find" field, here you can enter the text in the file name that you want to replace with another one.
  4. The "Replace" field, here you can enter the text with which you want to replace the text from the "Find" field.

The "Run" button starts the renaming process. In front of this button there is a list in which, even before the start of renaming, the results of renaming are displayed in the format old file name -> new file name. To check if you have entered the correct renaming conditions before clicking the "Run" button, review this list. If you entered everything correctly, then after the -> symbol, exactly the file names that you want to receive should be displayed.

In the "Name" field, you can enter special characters and commands to form a new file name. Let's take a look at some of the main commands.

[N] - indicates the name of the old file. If you enter only [N] in the "Name" field, the new file name will be the same as the old one. That is, the [N] command replaces the entire filename without the extension.

The first character of the old filename. Similarly, the or commands denote the second or fifth character in the old filename.

Four characters from the old filename from two to five.

All characters of the file name, starting with the second.

Five characters of the filename, starting with the second.

The fifth character from the end in the file name.

The characters of the file name, starting from the second to the fifth from the end of the character.

[E] - file extension. fits only in the "Extension" field, or in the "Name" field, if the extension of the source file needs to be inserted into the name.

A counter that starts at 01, changes by one when moving to the next file, and always has a two-digit number. Similarly, the command assigns to the new file name a counter already of three digits and with a step equal to two. That is, 001, 003, 005 and so on. The counter fits into the new file name where you put this command in the "Name" field. For example, if you write a track or just a track , then all the files selected in the folder will be renamed to track 01, track 02, and so on.

[F] - all words after the position of this command in the new name will start with a capital letter. For example, we want all track names in a folder to have words with first capital letters after the number. then in the field "Name" we write [f][N] and in the field "Extension" we enter [E]. then the new files will be named the same as the old ones, but each word in their names will start with a capital letter.

[d] - adds the current date to the new name.

[t] - adds the current time to the new name.

instead of full date add only the year (command [Y]), day (command [D]), or month (command [M]). The [y] command inserts the year not as four digits, but only as the last two digits of the year.

On this, with the main commands, you can finish and move on to specific examples.

Example 1

Suppose we have files with the .html extension in the folder and we want to change the extension of all these files to .txt in order to edit them in text editor. Then, select all the files, press Control + M, enter [N] in the "Name" field, and enter txt in the "Extension" field. check the result in the list next to the "Run" button and click this button.

Example 2

Let's say we downloaded an audiobook in the form of a folder with mp3 files, but the name of each file has "" signed, and we want to remove this fragment from all files. then, in the group renaming dialog, enter [N] in the "Name" field, enter [E] in the "Extension" field, write in the "Find" field, and leave the "Replace" field empty. Note that the characters of the left and right square brackets must be enclosed in square brackets so that they are not regarded as the beginning and end of a service command. We check the result in the list before the "Run" button and press this button. The "Substitution" checkbox must be unchecked, otherwise the entire file name will be replaced with an empty name, and not just the piece we need.

Example 3

Suppose we have a folder with music tracks whose names look like 01 - Song1.mp3, 02 - song2.mp3 and so on. We want to remove the character - followed by a space from the names of all files, so that only 01 Song1.mp3, 02 Song2.mp3 and so on remain. Then in the "Name" field we write [N], in the "Extension" field we write [E], in the "Find" field we enter "-" without quotes, and the "Replace" field is left empty. You can leave the "Find" and "Replace" fields empty, and in the "Name" field, enter the counter and part of the old file name without the first five characters, which includes the track number with a dash and a space after it. That is, we write like this: Only the part starting with the sixth character, that is, the name of the track itself.

Example 4

Suppose we have a folder with music tracks whose names consist of words separated by the _ symbol without spaces, and we want to remove the _ symbol from all names and replace it with a space. Then we fill in the "Name" and "Extension" fields as in the first two examples, in the "Find" field we write _, and in the "Replace" field we enter one space. In this case, the numbers at the beginning of the tracks will remain unchanged. That is, files like 01_song_about_love.mp3 will be renamed to 01 song about love.mp3.

Example 5

Let's say that we want to add the album name to each file after the number of each song before the song name in the folder with music tracks from the album. Let's say our album is called "Best of". Then in the field "Name" enter: Best of. Here we remove the first 2 characters from the old name of each file, which contain the track number, and assign the numbering ourselves. if there are more than 100 tracks in the folder, then instead of writing, and instead of writing already.

Example 6

Let's say that we are writing a coursework and we want the year to be added to the name of each file in the coursework folder at the end of the name, so that we know after many years in which year we wrote it. then in the "Name" field we write [N] [Y] Then, for example, the target and methods.doc file will be renamed to Targets and methods 2012.doc, and the Conclusion.doc file to Conclusion 2012.doc.

Example 7

And here, a good example on counters. Suppose we have two folders, the "even" folder contains only all the scanned even pages of the book, and the "Odd" folder contains only the scanned odd pages. Moreover, in both folders, the files are numbered the same Page001.jpg and so on. we want to merge the scanned pages from two folders into one so that all pages go exactly one after another, even for odd. Then, in the "Odd" folder, select all the files and enter in the "Name" field. Here we cut off the last three characters with the file number at the end of each file name, but add our own counter, which already assigns only odd numbers. we get the files Page001.jpg, Page003.jpg and so on.

In the "Even" folder, we also select all the files, but since the first even page is page number 2, we already enter in the "Name" field. After renaming, we will get the files Page002.jpg, Page004.jpg and so on in this folder. Now, we copy all the files from both folders into one shared folder, and we get correctly sorted scanned pages.

Example 8

Finally, the last example. Let us have sound files in the folder named 01-song1.mp3, 02-song2.mp3 and so on. we want each file name to have a space before and after the dash. if there are no more than 100 tracks in the folder, then in the "Name" field we enter - or and we get the desired result. Since the dash is always in third place in the name of each file, the command will always give a dash in the new name.

Find the file you want to rename in the desired folder. Select the file, right-click and select Rename. Press Backspace to delete the old file name. Enter a new file name. Please note that you cannot enter the characters "\/:*?"|" in the file name. After entering, press Enter.

Method two

Select the required file. Right-click on the file and select "Properties". Find the line where the extension (format) of the file is written. Enter a new file name in this line, as well as the original or new format. Click "Apply" and then OK.

You can find the required file from the search bar in the Start menu. To do this, enter the first letters of the name of the file you are looking for in the search bar and press Enter. A list of found files with a similar name will appear. From them, you need to select the file that you want to rename.

For convenience, the interface language should be changed to the language in which the file will be named before clicking on the "Rename" item.

You should not change the file format without the need, as this may not open the file. When using the second renaming method, the file extension may be automatically erased from the line. In this case, you must enter the extension again. Unlike Windows 8, in Windows 7 the extension must be specified in the file properties. Latin expansion after the file name separated by a dot without spaces. A file without an extension cannot be opened.

After changing the name, the file moves up or down in the folder. To find the file and check the correct name entered, you need to scroll through the contents of the folder and find the highlighted file. This is the file that has just been renamed.

Additional way for graphic and text files

In addition to the methods described, text and graphic documents can be saved under a different name from a text or graphic editor. To do this, open the file in the editor. If this image is graphics editor, such as Gimp, Photoshop, or Paint. If this is a text document, then in a text document, for example, Word, WordPad, LibreOffice or Notepad.

Next, click on the icon located in the upper left corner of the editor. This icon may be called "File" or simply an icon. Select "Save as" from the drop-down list of actions. If you choose just "Save", the file will be saved with the same name. In the line that appears, delete the file name and enter a new name. Select the format in which to save the file.

Press Enter. If an additional window appears, also press Enter. This will create a copy of the file with a new name. If the file with the old name is no longer needed, it can be deleted.