2016-01-21 23:42:37 +00:00
|
|
|
# mmv
|
|
|
|
|
|
|
|
> Move and rename files in bulk.
|
2021-10-05 13:50:45 +01:00
|
|
|
> More information: <https://manned.org/mmv.1>.
|
2016-01-21 23:42:37 +00:00
|
|
|
|
|
|
|
- Rename all files with a certain extension to a different extension:
|
|
|
|
|
|
|
|
`mmv "*{{.old_extension}}" "#1{{.new_extension}}"`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Copy `report6part4.txt` to `./french/rapport6partie4.txt` along with all similarly named files:
|
2016-01-21 23:42:37 +00:00
|
|
|
|
2020-10-04 18:33:38 +01:00
|
|
|
`mmv -c "{{report*part*.txt}}" "{{./french/rapport#1partie#2.txt}}"`
|
2016-01-21 23:42:37 +00:00
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Append all `.txt` files into one file:
|
2016-01-21 23:42:37 +00:00
|
|
|
|
2020-10-04 18:33:38 +01:00
|
|
|
`mmv -a "{{*.txt}}" "{{all.txt}}"`
|
2016-01-21 23:42:37 +00:00
|
|
|
|
|
|
|
- Convert dates in filenames from "M-D-Y" format to "D-M-Y" format:
|
|
|
|
|
2020-10-04 18:33:38 +01:00
|
|
|
`mmv "{{[0-1][0-9]-[0-3][0-9]-[0-9][0-9][0-9][0-9].txt}}" "{{#3#4-#1#2-#5#6#7#8.txt}}"`
|