

If we consistently use a standard separator between file name components when naming files, such as the space-hyphen-space sequence used in our example file names, we can rely on this consistency, in many cases, to make our file renaming tasks much easier. In a regular expression, the period represents a single instance of any character except the invisible end-of-line characters. One of the most useful of these character classes - especially for quick-and-dirty file renaming operations - is the humble period (.). But there is a small number of reserved characters and other notations called character classes that each represent a specific character type, and this is where the power of a regular expression lies. A regular expression processor interprets most characters literally. Regular expressions feature rules that specify how to represent characters and - more importantly - character types. Let’s use these file names as examples: Stevie Ray Vaughan - Pride and Joy.aac Stevie Rya Vaughan - Texas Flood.aac Steve Ray Vaughan - Couldn’t Stand the Weather.aac Stevey Ray Vaughn - Lenny.aac Stevie Ray Vaughn - Call It Stormy Monday.aacĪs you can see, only one of these files features the artist’s correctly spelled last name. A Better Finder Rename’s Replace regular expression action makes it easy to standardize the spelling among these files. As sometimes happens, many of the tracks feature misspellings of Stevie’s last name, which can be a real pain in the neck. Let’s say we have a number of songs by Texas blues legend Stevie Ray Vaughan. Using this regular expression, we can then tell A Better Finder Rename to replace a certain part of the file name with something else or completely rearrange the components of the file name to form a new file naming convention. Using a regular expression creates what amounts to a template describing a file naming convention, and can potentially identify a large number of files - all the photos taken during a particular event, for instance - in a given collection. transposing user-defined parts of a file nameĪ regular expression is an encoded way of representing a pattern in a bit of text.moving a user-defined part of a file name to a new location.replacing a user-defined part of a file name with a user-defined text string.To this end, we will look at a few file renaming scenarios that can’t be addressed using out-of-the-box actions: Today, you will learn what regular expressions are, how to apply regular expressions to file renaming tasks, and how to use regular expressions with A Better Finder Rename to manage file name components. They don’t realize the purpose or potential of these tools, and are at a significant disadvantage.

Usually, though, ABFR’s advanced regular expression features can help.Ī Better Finder Rename’s regular expression actions bring a lot of functionality to the table, but many ABFR users aren’t familiar with regular expressions. A Better Finder Rename & Regular Expressions Managing File Name ComponentsĪ Better Finder Rename is a powerful and flexible batch file renaming utility, but sometimes a scenario arises for which ABFR doesn’t provide an out-of-the-box solution.
