ComputersSoftware

Mass renaming of files

Changing the name of one or more files is an elementary thing. But if you need to do a group renaming of files, the number of which exceeds several tens or even hundreds of pieces, manual input of new names can take several hours, or even more. Fortunately there are special programs, and also Some techniques that allow you to reduce the time required to a minimum and avoid routine manual work. Therefore, if there is a desire to restore order in your music or photo collection, give all stored files clear names, now is the right time to do it. Consider how best to do a batch rename of files that have accumulated in your computer.

Mass change of names depends, first of all, on what operating system you use. Here are some tricks for the most popular OS:

  • Windows 7

The easiest way to rename files in this system is running inside the Explorer (Windows Explorer). Beforehand, you need to put all the necessary files in a separate directory so that you do not accidentally hook on unnecessary documents. Now select them using the combination "Ctrl + A" and right click we call the context menu in which we select the "Rename" item. Enter the general name, for example "wallpaper", and all our selected files will receive new names consisting of a common name and a serial number in parentheses ("wallpaper (1)", "wallpaper (2)", "wallpaper (3)" and Etc.).

Also, a massive renaming of files can be done using the command line. In this case, using "Win + R", launch the window of the desired application, type in the line "cmd", and press "Enter" to open the command line. In it, use the "cd" command to specify the path to the folder with the files, for example, for the "pics" folder on the D: \ drive, the command will be as follows: cd d: \ pics. Let's say we want to change the file extension from "GIF" to "JPG". We use the command "rename" or abbreviated "ren" and write ren * .gif * .jpg. The team itself and the extensions between themselves should be separated by one space.

  • Linux

In this system, files can be renamed using the standard utility "Rename". The command for the utility "Rename" looks like this:

Rename [-v] [-n] [-f] perlexpr [files];

[-v] - show new file names;

[-n] - list the files selected for renaming;

[-f] - overwrite if existing files are matched;

Perlexpr - the template by which you want to rename.

Suppose that there are files with the extension "TXT" in the folder among others, and we want to rename them to "mytext.bak". Then the team will look like this:

Rename 's / .txt / .mytext.bak / g' * .txt

Let us explain what our template means:

S - replacement is required;

/.txt/ - that is replaced;

/.mytext.bak/ - new name;

G - global, the operation will affect all detected occurrences.

The "rename" command can also help with a massive change in the register. The expression "rename 'y / az / AZ /' * 'converts all the names, making them completely written with capital letters.

  • Mac OS

Renaming files in this environment is not as convenient and simple as in Windows. In the Finder, initially this function is not available, but it can be added via Automator. To do this, run this standard application and select "Service". Then go to the "Files and Folders" item in the library. It has a sub-item called "Rename Finder Objects". It needs to be moved to the editing area, while refusing to copy. In the "Service receives" window, we set up "Files or folders". Then we put "Use this service in the Finder", in the parameters of the renaming we tick the "Show at runtime" checkbox and set the "Make it consistent" option. Now it remains only to check and save the settings.

In order to rename files with additional settings (moving, translating, searching by tags), it is better to use special universal utilities, such as "SVS RenameFiles", "Multi Renamer", "Advance Renamer", etc.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.