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
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,23 @@ Other options include
105
105
- `-a` or `--all` which includes files that start with a dot.
106
106
- `-F` or `--follow` which follows symbolic links
107
107
108
+
### Copy and Rename a Single File
109
+
110
+
You can copy and rename a single file by specifying the source file and the destination filename (not just a directory). For example, to copy `input/.env_publish` to `output/.env`:
111
+
112
+
```bash
113
+
copyfiles input/.env_publish output/.env
114
+
```
115
+
116
+
This will copy and rename the file in one step.
117
+
You can use this for any filename, not just files starting with a dot:
118
+
119
+
```bash
120
+
copyfiles input/original.txt output/renamed.txt
121
+
```
122
+
123
+
If the destination path is a directory, the file will be copied into that directory as usual. If the destination path is a filename, the file will be copied and renamed.
0 commit comments