Skip to content

Instantly share code, notes, and snippets.

@garvit-exe
Created June 21, 2024 04:58
Show Gist options
  • Save garvit-exe/bb2023933e802a175ac28a4e8edb1196 to your computer and use it in GitHub Desktop.
Save garvit-exe/bb2023933e802a175ac28a4e8edb1196 to your computer and use it in GitHub Desktop.
Windows: Rename all files in a folder from *.* to *.jpeg
@echo off
setlocal enabledelayedexpansion
REM Change this path to the directory where your files are located
set target_path=C:\path\to\your\directory
cd /d "%target_path%"
for %%f in (*.*) do (
set "filename=%%~nf"
ren "%%f" "!filename!.jpeg"
)
echo All files have been renamed to .jpeg
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment