Renaming a large number of files. Changing file names in a list

In Windows, there are many ways to rename several files at once - through Explorer, command line or PowerShell. There is a solution for amateurs too GUI, and for those who prefer to work with teams.

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

Conductor

Explorer has a rather unobvious way to quickly rename groups of files. First, collect all the necessary files in one folder. Switch to the Table view (Details) and sort the files into in the necessary order– The conductor assigns numbers according to the list starting from the top.

Select all the files you want to rename, click right click mouse and select “Rename”. Enter a new name and press .

Explorer will append a number to this name for each file. Convenient way bring 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 mass renaming 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– hold down , right-click on the folder and select “Open command window here”.

More often command rename used to change the extension of an entire group of files - this cannot be done in Explorer. The command below, 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 team environment. WITH using PowerShell you can pass the output of one command (cmdlet, as it's called here) to another command, just like in Linux and other UNIX-like systems.

The main commands are Dir to get a list of files in the current folder and Rename-Item to rename an object (in in this case file). Just pass 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 desired files. It is best to put all the files in one folder so as not to accidentally rename unnecessary ones.

Let's say we want to replace spaces in file names 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 the files differently.

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

Third party utilities

If required powerful tool to mass rename files, but don’t want to mess with the command line, you can use third party utilities, For example . True, the interface of this application is quite confusing, since it provides a lot of possibilities that are usually only achievable using regular expressions and complex commands.

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

File manager Total Commander very popular among program users screen access, because, along with rich functionality for working with files and directories, it has good accessibility for assistive technologies. In this article we will explain and specific examples we'll show you how to help Total Commander execute various options group renaming files.

To rename a group of files, select them, or press Spacebar on the necessary files, or by selecting all the files in the folder using Control+A and pressing Control+M. The "Batch file renaming" dialog will open. To rename files in the "Group renaming" dialog, use special characters and teams. All such symbols are contained in square brackets.

Attention! All service characters must be entered case-sensitive. For example, the [N] and [n] commands perform different actions.

description of dialogue and commands

There are many elements in the "Batch Renaming" dialog, but we will only need those that are directly involved in the renaming.

  1. The "Name" field indicates a template for the new file name without extension.
  2. Field "Extension", here the extension of the new name is indicated.
  3. The "Find" field, here you can enter text in the file name that you want to replace with another.
  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 renaming begins, the results of renaming are displayed in the format old file name -> new file name. To check whether you entered the rename conditions correctly, review this list before clicking the "Run" button. If you entered everything correctly, then after the -> symbol the exact 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 look at the main ones of these 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 file name without extension.

The first character of the old file name. Similarly, the commands or represent the second or fifth character in the old file name.

Four characters from the old file name from the second to the fifth.

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

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

The fifth character from the end in the file name.

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

[E] - file extension. fits only in the "Extension" field, or in the "Name" field if you need to insert the extension of the source file into the name.

Counter starting with 01, changing by one when moving to next file, and always has a two-digit number. Similarly, the command appends to the new file name a counter already from three digits and with a step equal to two. That is, 001, 003, 005 and so on. The counter is written 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 begin with a capital letter. For example, we want all track names in a folder after the number to have words with the first in capital letters. then in the “Name” field we write [f][N] and in the “Extension” field we enter [E]. then the new files will be named the same as the old ones, but each word in their names will begin with a capital letter.

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

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

Instead of the full date, you can 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 two last digits year.

On this with main teams You can finish and move on to specific examples.

Example 1

Suppose we have files in a folder with the extension .html 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 is 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 left and right bracket characters must be enclosed in square brackets so that they are not interpreted as the start and end of a service command. We check the result in the list in front of the “Run” button and click 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

Let's say 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 - followed by a space from all file names, 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 leave the “Replace” field 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: . the sixth character, that is, the track name itself.

Example 4

Let's say 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 the names and replace it with a space. Then fill in the “Name” and “Extension” fields as in the first two examples, write _ in the “Find” field, and enter one space in the “Replace” field. 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 in a folder with music tracks from an album, after the number of each composition, before the name of the song, we also want to add the name of the album to each file. Let's say our album is called "Best of". Then in the “Name” field we 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 a folder, then instead we write , and instead we write 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 folder with the coursework at the end of the name, so that we know after many years, in what year we wrote it. then in the “Name” field we write [N] [Y] Then, for example, the file goals and methods.doc will be renamed to Goals and Methods 2012.doc, and the file Conclusion.doc to Conclusion 2012.doc.

Example 7

And here, good example to the 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 combine scanned pages from two folders into one so that all pages are strictly one after another, even after odd. Then, in the “Odd” folder, select all the files and enter . Here we cut off the last three characters with the file number at the end of the name of each file, but add our own counter, which 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, then in the “Name” field we enter . After renaming, we will get the files Page002.jpg, Page004.jpg, and so on in this folder. Now, copy all the files from both folders into one shared folder, and we get correctly sorted scanned pages.

Example 8

Finally, one last example. Let them be in our folder sound files 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 enter - or in the “Name” field and get the required result. Since the dash is always in the third place in the name of each file, the command will always give the dash in the new name.

Among the most powerful functionality - the most popular file manager among third-party software of this type for Windows - there is one notable feature that will be useful to any computer user. And this is a group renaming of files. Sooner or later, each of us faces the need to organize data on a computer. Someone needs to bring the name of content downloaded from the Internet to a single format.


Someone needs to organize their home media library so that photos or videos have names associated, for example, with the events of the shooting. And those who use a computer in their professional activity It may be necessary to construct data based on some technical characteristics.

Renaming a significant amount of information manually can take a lot of time. will do this job in a matter of seconds. How does group renaming work as part of this file manager?

1. Group renaming function as part of Total Commander

To take advantage of the group renaming feature on any of the panels open the folder with the operated files and select all of them Ctrl keys+A. Or hold down Ctrl and indicate only individual of them. Next, we launch group renaming - either in the menu "File", or hotkeys Ctrl + M .

The value entry field in the function window that opens is a name mask. You need to enter your values ​​into it, which will be contained in the names of all files, like this: "Photo", "Video", "Wallpapers", "Event such and such", "Track" etc. And then add an expression enclosed in brackets, implemented in the form of buttons.

This expression will predetermine the postscript in future names - serial number, creation date, specific parameters for individual file types. You can add as many expressions as you like, separating them with a space, underscore, dot, parentheses, or other easy-to-read symbols.

The lower part of the function window is a table of comparisons between the names of the old and new ones, as they will be after the operation is completed. So, by selecting renaming criteria, you can monitor the readability of future names right on the fly. And when required format will be found, only then proceed with the renaming operation (button below “Run”) .

Bulk renaming is also possible for file extensions. Using this function You can change not only entire names, but also remove individual meanings from them or replace them with others, set the desired case of letters, and also do other interesting things. Let's look at individual group renaming templates.

2. Changing names

The group rename function is launched with the default expression set in the mask [N]– current file name. If you leave this expression, the names will remain as they are and will change, accordingly, only in part of the selected additions. If the names need to be changed completely, remove them [N] (using Del or Backspace keys) and enter yours general meaning. As, for example, in our case, a common name is given to all desktop wallpapers "Space Wallpapers". Next, you need to choose how to identify files with this common name.

Without changing the current names, they can be organized by setting single format writing taking into account lower and upper case letters.

2. Serial numbers in names

You can identify files with a single common name by assigning a serial number to each of them using the expression [C]. In the mask column, place the cursor before or after the general name and press the button "[C]Counter".

Some settings are available for the counter:

Count step (numbering, for example, by type 1, 3, 5, 7, etc.) ;
The number from which the countdown begins
Number format (number of digits in the serial number) .

If group renaming is carried out for more than 9 files, you can set, for example, 3 digits in the sequence numbers. Then they will have the format 001 , 002 , 003 etc. And, accordingly, such files in separate file managers will be displayed as needed, and not with a distorted order, when 1 is followed by 10, and only then by 2.

3. File creation dates in names

Perhaps it will become more convenient for someone to navigate their media library if photos and videos contain the dates of captured events. To do this, you need to add the expression to the mask as one of the identifying designations . This is the date the file was created.

Possibility of generating titles including other dates for certain file types includes expression plugins. When the button is pressed "[=?] Plugin" we will have a choice of a huge number of different parameters. Yes, in the selection of plugins "tc" The names can include the date and time of modification, the date and time of last access.

4. Various parameters in names

So the button mentioned "[=?] Plugin" opens access to a huge list of file parameters. In particular, in the collections of plugins "shell details" And "tcmediainfo" we can include in the names of media files:

dates of sound recording, filming or digitization;
genre;
performer;
album, its year of release;
tags and ratings;
bitrate;
video frame size;
image size;
video or audio codecs;
as well as other data.

Of course, provided that the media data contains information about the selected parameters.

5. Changing extensions

Group renaming is carried out not only for direct data names, but also for their extensions. is not a format converter; with this renaming you can only do what can be done by simply manually replacing extensions. Like, for example, bringing extensions into a single format, taking into account the case of letters.

Or replacing files ".txt" on ".ini" , ".bat" etc. To completely remove file extensions, simply leave their mask without any expression.

6. Renaming with moving

Renaming files can be combined with distributing them into folders. To do this, the renaming operation must be carried out for each separate group of data that is placed in one folder. At the beginning of the mask, enter the folder name (either existing or new, it will be created automatically) , then we put a slash, and then we select other expressions.

7. Getting rid of serial numbers in names

How to remove the postscript in the form of file numbering and leave only the main names? This may become necessary when organizing a collection of audio recordings. Press the button "Range" and select the main name as a block, i.e. part of the name without serial numbers. Click "OK" and perform the operation.

8. Removing individual values ​​from names

How to remove identical components from data group names? For example, the values "Label" or "Copy", genre, album year, or any other information that is not so important that it appears in the titles and complicates the perception of information. This value must be inserted into the column "Find". In the column below "Replace with" is selected «<Пусто>» .

9. Saving renaming templates

Any selection of expressions, plugins, replacement and counter settings can be saved as a template if in the future you need to return to renaming data in this format. We fill in the mask field, set other options and from the drop-down list columns « F2 Operation templates" choose "Save template". This drop-down list will contain all saved templates.

Group renaming of files can be canceled with the button "Rollback". And then the names will be returned to them old look. Important: For this procedure, the original location of the data is of fundamental importance.

Hello, dear friends. Today I will tell you about group renaming of files and show 2 methods. Perhaps you have thought about this, and perhaps you have encountered such a task when you need to rename several files, where the name must be assigned the same, but the difference is only in the serial number.

For example, to download graphic files This approach is often used on the site. Anyone who downloaded screenshots from websites probably paid attention to the names and numbering of the files. Especially on sites with a huge amount content.

Batch renaming files in Windows

IN operating system Windows, you can rename a selected group of files at once.

By the way: this scheme also works on Mac OS, but it is a little more thoughtful, and the output is exactly the file names that you intended.

Just don't think that Windows does everything badly. But, I don't like it automatic numbering in brackets.

In order to rename several files at once, you must first select these files (Ctrl+A – select all; Ctrl+ left button mouse – selecting individual files).


Enter the desired name and press the key « Enter".

As a result, all files from the selected list will be renamed, and each will be assigned a serial number to distinguish it.


Tip: If you are creating files for the Internet, assign names in Latin letters and not too long.

Windows has another option for renaming files, through the command line, but this is inconvenient and the method is completely outdated.

Group renaming of files in Total Commander

I like this method better, and it is the one I use all the time. The principle here is the same, you need to select the files and rename them with the specified parameters.

So, select the files ( Ctrl+A) and call the tool "Group renaming" (Ctrl+M)


A new window will open where you can configure the renaming parameters, that is, assign a new name, add a counter, date, time. You can also change the file type and create templates.

For regular group renaming, it will be enough to assign a new name and add a counter:

Newname-[C]

Having selected the parameters, press the button "Run" and look at the result.


Your files have been renamed.


This method has many more possibilities, but even the simplest application will go quickly and smoothly. You can also use TC for . I'm sure you will find this feature useful too.

Video tutorial on the topic

Friends, these methods will allow you to quickly rename as many files as you like. And do not waste time on each file, but do it in batches.

I wish you good luck!

Best regards, Maxim Zaitsev

Cameras and video cameras save files with names, little telling the user about photographs and video footage. By default, file names are most often formed from a meaningless set of letters and numbers. File names like IMG2312 or DCIM1978765 among dozens of similar ones in the catalog do not give the user any information about the photo or recorded video. Another thing is the name of files like New_Year_2014_123 or Egypt_Pyramid_Cheops_456, it immediately becomes clear what information the files store. Free program ReNamer is used for batch renaming of files using rules, filters and other useful algorithms, is a great tool for automating the process of renaming files.

Changing file names in a list

The program's capabilities allow you to rename groups of files using a large number of functions designed for this operation. To generate new file names, the user is required to create rules for renaming. With their help, it is possible to remove a certain set of characters from a file name, insert text, replace characters, insert various meta tags into the file name, transliterate letters in file names, change the case of letters, insert sequential values ​​(indexing), rename files by mask, use to rename regular expressions and scripts to Pascal language. In addition to files, the ReNamer utility can also rename folders. Before the final renaming of files, the program provides preview result.

Screenshots