|
1 | 1 | ---
|
2 | 2 | title: PowerToys PowerRename utility for Windows
|
3 | 3 | description: A windows shell extension for bulk renaming of files
|
4 |
| -ms.date: 08/03/2023 |
| 4 | +ms.date: 08/06/2023 |
5 | 5 | ms.topic: article
|
6 | 6 | ms.localizationpriority: medium
|
7 | 7 | no-loc: [PowerRename, Windows, File Explorer, regex, Boost]
|
@@ -99,42 +99,43 @@ If selected, you can use the following patterns as part of the _Replace with_ te
|
99 | 99 | You can also use multiple counters in the same replace string and combine customizations.
|
100 | 100 |
|
101 | 101 | For example, given a _Search_ text `a` and a set of files:
|
| 102 | + |
102 | 103 | - a.jpg
|
103 | 104 | - ab.jpg
|
104 | 105 | - abc.jpg
|
105 | 106 |
|
106 | 107 | A _Replace with_ text `Image_${padding=4;increment=2;start=10}_` would produce the following:
|
| 108 | + |
107 | 109 | - Image_0010_.jpg
|
108 | 110 | - Image_0012_b.jpg
|
109 | 111 | - Image_0014_bc.jpg
|
110 | 112 |
|
111 |
| - |
112 | 113 | ## Replace using file creation date and time
|
113 | 114 |
|
114 | 115 | The creation date and time attributes of a file can be used in the _Replace with_ text by entering a variable pattern according to the table below. Selecting the tool-tip in the _Replace with_ field allows you to view and select from the supported patterns.
|
115 | 116 |
|
116 |
| -| Variable pattern | Explanation |
| 117 | +| Variable pattern | Explanation | |
117 | 118 | | :--- | :--- |
|
118 |
| -| `$YYYY` | Year, represented by a full four or five digits, depending on the calendar used. |
119 |
| -| `$YY` | Year, represented only by the last two digits. A leading zero is added for single-digit years. |
120 |
| -| `$Y` | Year, represented only by the last digit. |
121 |
| -| `$MMMM` | Name of the month. |
122 |
| -| `$MMM` | Abbreviated name of the month. |
123 |
| -| `$MM` | Month, as digits with leading zeros for single-digit months. |
124 |
| -| `$M` | Month, as digits without leading zeros for single-digit months. |
125 |
| -| `$DDDD` | Name of the day of the week. |
126 |
| -| `$DDD` | Abbreviated name of the day of the week. |
127 |
| -| `$DD` | Day of the month, as digits with leading zeros for single-digit days. |
128 |
| -| `$D` | Day of the month, as digits without leading zeros for single-digit days. |
129 |
| -| `$hh` | Hours, with leading zeros for single-digit hours. |
130 |
| -| `$h` | Hours, without leading zeros for single-digit hours. |
131 |
| -| `$mm` | Minutes, with leading zeros for single-digit minutes. |
132 |
| -| `$m` | Minutes, without leading zeros for single-digit minutes. |
133 |
| -| `$ss` | Seconds, with leading zeros for single-digit seconds. |
134 |
| -| `$s` | Seconds, without leading zeros for single-digit seconds. |
135 |
| -| `$fff` | Milliseconds, represented by full three digits. |
136 |
| -| `$ff` | Milliseconds, represented only by the first two digits. |
137 |
| -| `$f` | Milliseconds, represented only by the first digit. |
| 119 | +| `$YYYY` | Year, represented by a full four or five digits, depending on the calendar used. | |
| 120 | +| `$YY` | Year, represented only by the last two digits. A leading zero is added for single-digit years. | |
| 121 | +| `$Y` | Year, represented only by the last digit. | |
| 122 | +| `$MMMM` | Name of the month. | |
| 123 | +| `$MMM` | Abbreviated name of the month. | |
| 124 | +| `$MM` | Month, as digits with leading zeros for single-digit months. | |
| 125 | +| `$M` | Month, as digits without leading zeros for single-digit months. | |
| 126 | +| `$DDDD` | Name of the day of the week. | |
| 127 | +| `$DDD` | Abbreviated name of the day of the week. | |
| 128 | +| `$DD` | Day of the month, as digits with leading zeros for single-digit days. | |
| 129 | +| `$D` | Day of the month, as digits without leading zeros for single-digit days. | |
| 130 | +| `$hh` | Hours, with leading zeros for single-digit hours. | |
| 131 | +| `$h` | Hours, without leading zeros for single-digit hours. | |
| 132 | +| `$mm` | Minutes, with leading zeros for single-digit minutes. | |
| 133 | +| `$m` | Minutes, without leading zeros for single-digit minutes. | |
| 134 | +| `$ss` | Seconds, with leading zeros for single-digit seconds. | |
| 135 | +| `$s` | Seconds, without leading zeros for single-digit seconds. | |
| 136 | +| `$fff` | Milliseconds, represented by full three digits. | |
| 137 | +| `$ff` | Milliseconds, represented only by the first two digits. | |
| 138 | +| `$f` | Milliseconds, represented only by the first digit. | |
138 | 139 |
|
139 | 140 | For example, given the file names:
|
140 | 141 |
|
@@ -196,7 +197,7 @@ _When using the variables, "Match all occurrences" must be selected._
|
196 | 197 |
|
197 | 198 | There are great examples/cheatsheets available online to help you:
|
198 | 199 |
|
199 |
| -[Regex tutorial — A quick cheatsheet by examples](https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285) |
| 200 | +[Regular Expression Tutorial](https://www.regular-expressions.info/tutorial.html) |
200 | 201 |
|
201 | 202 | [ECMAScript Regular Expressions Tutorial](https://o7planning.org/en/12219/ecmascript-regular-expressions-tutorial)
|
202 | 203 |
|
|
0 commit comments