22 Votes

Search and Replace in File Names

Tutorial by Stefan Trost | Last update on 2022-01-05 | Created on 2016-07-20

I have a great number of files and folders and I would like to replace some text in their names with some other text. The problem is that there are so many files. Therefore, I would like to automate this task. Is there any possibility for that?

Answer: The FileRenamer available for the operating systems Windows, macOS and Linux is offering this possibility. It is possible to search and replace in file names as well as also explicitly in the file extension.

  1. First, we add the files and folders we would like to process to the list in the File Renamer. For this, we can just drag the files from an arbitrary folder onto the application.
  2. Next, we adjust our desired changes. For this, we activate the options "Changes > Name > Search and Replace" and/or "Changes > Extension > Search and Replace" on the right. Here, we can also type the search text and the replace text into the corresponding fields.
  3. The column "Preview" in the file list shows how the file names will look like after the renaming. With clicking the button "Apply Changes" we can finally rename all files in the list.

With the option "Match Case" we can determine whether the replacement should be carried out independent from uppercase and lowercase writing or not. If the option is active, a and A are treated as two different letters when searching and replacing; if the option is inactive, a and A are treated as the same as in the case of replacement.

With the option "Interpet as a regular expression", it is possible to use a regular expression (RegEx) in the search field. With this, also dynamic replacements are possible. For example, searching for [0-9] or [a-z] would replace all numbers respectively lower case written letters from a to z.

Furthermore, it is possible to use placeholders in all fields. An overview over all placeholders available can be found here. For example, it is possible to replace the current date or realize a file numbering with that.

ReplyPositiveNegative

About the Author

AvatarYou can find Software by Stefan Trost on sttmedia.com. Do you need an individual software solution according to your needs? - sttmedia.com/contact
Show Profile

 

Related Topics

Rename File to its Folder Name

Tutorial | 0 Comments

The Askingbox Search

Info | 0 Comments

PHP: File Download Script

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.