Removing a pattern using a wildcard
 
 
Suppose you want to remove the patterns 'EC3303-', 'EC3304-' until 'EC3308-' inside each of the selected filenames (screenshot below).
 


With the methods described earlier this will be difficult, since until now the pattern (to be removed or replaced) has been fixed. In this particular case the pattern that needs to be removed changes slightly for each filename. For file number 40 (in the above screenshot), the pattern which needs to be removed is 'EC3303-', for file number 41 it is 'EC3304-', etc.
 
The method described here uses the concept of a wildcard.
 
A wildchard in Fast File renamer is a '*' character which can be used to indicate any character or group of characters inside a pattern (i.e. the string that you would like to remove or replace). More complicated examples of wildcard usage can be found e.g. in regular expressions, SQL, Unix⁄Linux and to a lesser degree also in MS DOS.
 
For instance, regarding Fast File Renamer, when you want to remove the pattern 'EC33.....-' from files 40 to 45 (in the screenshot above), then you can use the expression
 
'EC330*-'.
 
Here the '*' character indicates any possible string of characters (including the empty string with zero length). This expression will remove any string that starts with 'EC330' and ends in '-'.
 
Because the wildchard character is so powerful, please be careful when you use wildcards. Always use the Simulate function first. Then check how many replacements the simluate function has made and compare this with the expected number of replacements. Only after having verified the results thouroughly should you  perform a real rename.
 
If the number of simulated replacements is higher than what you expected, clearly some other files have been altered and you need to perform Undo simulate and adjust the expression so that it is less general.
 
For instance, if the expression was
 
'EC*-', then the program would also have changed files 37 to 39, files 46, 47, etc. and probably many more. Also note that an expression has the potential to alter a filename at any position. So don't expect the expression to change just the beginning of a filename.
 
The following screenshot shows the expression inside the field Pattern to remove from filename
 
 


And the last screenshot shows the results of a Simulate action:
 


Please verify that the results are correct. The simulate function reports six simulated replacements made, which is corresponds exactly to files number 40 to 45.
 
Now that the expression tests out OK, you can click Undo simulate, then you can click Perform rename.
Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 14 of 17)

This page is created with TreePad