You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ If the destination path is a directory, the file will be copied into that direct
127
127
128
128
### Rename Multiple Files During Copy
129
129
130
-
#### 1. Rename Using Glob Patterns
130
+
#### 1. Rename Using Wildcard (`*`)
131
131
132
132
You can use a wildcard (`*`) in the destination to rename files dynamically. For example, to copy all `.css` files and change their extension to `.scss`:
133
133
@@ -146,7 +146,7 @@ You can combine this with `--flat` or `--up` to control the output structure.
146
146
#### 2. Rename Using a Callback (JavaScript API)
147
147
148
148
For advanced renaming, you can use the `rename` callback option in the API.
149
-
This functionreceives the source and destination path and should return the new destination path.
149
+
This functionreceives the source and destination path and should return the new destination path of each file being processed.
150
150
151
151
**Example: Change extension to `.scss` using a callback**
The `rename` callback gives you full control over the output filename and path.
177
177
178
178
>**Tip:**
179
-
> You can use either the glob pattern approach or the `rename` callback, or even combine them for advanced scenarios!
179
+
> You can use either the wildcard approach or the `rename` callback, or even combine them for advanced scenarios!
180
180
181
181
> [!NOTE]
182
-
> If you use both a destination glob pattern (e.g. `output/*.ext`) and a `rename` callback, the glob pattern is applied first and then the `rename` callback is executed last on the computed destination path. This allows you to combine both features for advanced renaming scenarios.
182
+
> If you use both a destination wildcard approach (e.g. `output/*.ext`) and a `rename` callback, the wildcard change is applied first and then the `rename` callback is executed last on the computed destination path. This allows you to combine both features for advanced renaming scenarios.
0 commit comments