Difference between revisions of "ReNamer:Masks"
Jump to navigation
Jump to search
(Examples added) |
|||
Line 41: | Line 41: | ||
For example, a mask list <code>*.txt;*.doc</code> matches files with a <code>*.txt</code> or <code>*.doc</code> extension. | For example, a mask list <code>*.txt;*.doc</code> matches files with a <code>*.txt</code> or <code>*.doc</code> extension. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Pattern | ||
+ | ! Description | ||
+ | |- | ||
+ | | <code>*.jpg</code> | ||
+ | | Matches files which have ".jpg" file extension. | ||
+ | |- | ||
+ | | <code>magic*</code> | ||
+ | | Matches files which start with "magic". | ||
+ | |- | ||
+ | | <code>*magic*</code> | ||
+ | | Matches files which have "magic" anywhere within the name. | ||
+ | |- | ||
+ | | <code>*magic.*</code> | ||
+ | | Matches files which end with "magic", excluding the file extension. | ||
+ | |- | ||
+ | | <code>*magic*.jpg</code> | ||
+ | | Matches files which have "magic" anywhere within the name and have ".jpg" file extension. | ||
+ | |- | ||
+ | | <code>*b?ll*</code> | ||
+ | | Matches files with have a letter "b" followed by any single character and then followed by "ll", such as "ball", "bell", "bill". | ||
+ | |} | ||
[[Category:ReNamer]] | [[Category:ReNamer]] |
Latest revision as of 22:10, 22 December 2019
Filename or wildcard masks are used for simple pattern matching using special placeholder characters.
Masks can be used in several places in ReNamer, including:
- Replace and Remove rules,
- Command line,
- Filter settings.
Placeholder characters
Character | Description |
---|---|
* (Asterisk)
|
Match any number of any characters. |
? (Question mark)
|
Match any single character. |
Extended pattern matching
Pattern | Description |
---|---|
[abc]
|
Matches any one of the specified characters ("a", "b" or "c"). |
[a-z]
|
Matches any one character in the specified range ("a" through "z"). |
Note: Only the selected renaming rules support extended pattern matching features.
Mask lists
Multiple masks can be expressed in a single parameter (mask list) by separating individual masks with semicolons (";").
For example, a mask list *.txt;*.doc
matches files with a *.txt
or *.doc
extension.
Examples
Pattern | Description |
---|---|
*.jpg
|
Matches files which have ".jpg" file extension. |
magic*
|
Matches files which start with "magic". |
*magic*
|
Matches files which have "magic" anywhere within the name. |
*magic.*
|
Matches files which end with "magic", excluding the file extension. |
*magic*.jpg
|
Matches files which have "magic" anywhere within the name and have ".jpg" file extension. |
*b?ll*
|
Matches files with have a letter "b" followed by any single character and then followed by "ll", such as "ball", "bell", "bill". |