Rename all file extensions in a folder with one command

Use the ren command with wildcards to change every file's extension in the current folder, e.g. .jpeg to .jpg.

WindowsFilescmdnamingMedium risk
Open a Command Prompt in the folder and run: ren *.jpeg *.jpg

01Command

Command
$ ren *.jpeg *.jpg

02What it does

The ren command supports wildcards, so ren *.jpeg *.jpg changes the extension of every .jpeg file in the current directory in one go. Open cmd in the right folder first (type cmd in Explorer's address bar). To do the same in every subfolder too, use: for /r %f in (*.jpeg) do ren "%f" *.jpg

03Risk

RiskMedium risk
RequirementsRun in a Command Prompt opened in the target folder (type cmd in Explorer's address bar)
!Warning: ren only changes names, it does not convert formats — renaming .png to .jpg won't make it a real JPEG. Close programs using the files first.

04Undo

Undo
$ ren *.jpg *.jpeg

05Sources

  • Ren / RENAME - Rename files
    SS64.com · technical · 2026-09-17
    Evidence: Documents REN/RENAME with wildcard support: patterns such as *.jpg rename all matching files in the current folder at once.
  • ren (rename) (Windows Commands)
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Official ren reference states that you can use wildcard characters (* and ?) to rename multiple files in one command.

Last verified: 2026-09-19 · Category: Files & Folders

06Related solutions