Replacing Text within Filenames using Filename Changer
This is the second part to the Filename Changer Tutorial. Today we will dive deeper into the Smart Replace feature within Filename Changer. This feature is available with JBatch It, Batch It, Batch It Pro and Batch It Ultra.
What Smart Replace does is to allow you to replace specific text within your filename with another. Let’s consider this example, I have a named “combotiffcontrolcenter.png” and wanted to rename it to “batchitcontrolcenter.png”, I can utilize the Smart Replace feature to do it.
To do this, all I need to do is under the Filename Changer settings, enable Smart Replace with the following settings
It is that simple. With this simple settings, all instances of “combotiff” within the filenames in the list will be replaced with “batchit”.
[wp_ad_camp_1]
Smart Replace is case-insensitive and so you do not need to worry if you have some text in upper or lower cases.
In a more complex example, supposed if I wanted to upsize my photos and tag “_X” to the end of each filename but some of the photos already has a “_L” which I also want to change to “_X”. Adding “_X” to the end of the filename is simple with the “Add Prefix and Suffix” function explored earlier and works great with filenames which does not already have the “_L” as its suffix. For those, it will end up as “_L_X” which will look odd.
[wp_ad_camp_2]
To overcome this issue, Smart Replace can be used together with the “Add Prefix and Suffix” function like below
In this circumstances, what would be done is to first remove the “_L” from the existing filenames if any by replacing it with nothing. Once that is done, all filenames will be stripped of the “_L” and will just include the “_X” added with the “Add Prefix and Suffix” function.
[wp_ad_camp_3]