Forrest logo
back to the mmv tool

mmv:tldr:f44a6

mmv: Rename all files with a certain extension to a different extension.
$ mmv "*${-old_extension}" "#1${-new_extension}"
try on your machine

The given command is using the mmv command to rename multiple files at once. Here is the breakdown of the command:

  1. mmv: This is the command itself that is used to rename files.

  2. "*${-old_extension}": This is the source pattern used to specify the files to be renamed. * is a wild card character that matches any part of the filename, ${-old_extension} is a variable representing the old extension of the files. So, this part matches all files with the old extension.

  3. "#1${-new_extension}": This is the target pattern used to specify the new names for the files. #1 is a placeholder referring to the part of the original filename matched by * in the source pattern. ${-new_extension} is a variable representing the new extension of the files. So, this part renames the files by adding the new extension to their original names.

In summary, the command renames files by replacing their old extension with a new extension, while keeping the rest of the original filenames intact.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mmv tool