FFMPEG Batch Processing Script to Rename All Files in Directory With a Glob or Pattern in Terminal

83 views Jun 3, 2025

@echo off setlocal enabledelayedexpansion REM Initialize counter set count=1 REM Loop through each image file (for .jpg and .png files) for %%f in (*.jpg *.png) do ( REM Format the number to be two digits, e.g., img01, img02 set filename=img if !count! lss 10 ( set filename=!filename!0!count! ) else ( set filename=!filename!!count! ) REM Rename the file and keep the original extension ren "%%f" "!filename!%%~xf" REM Increment the counter


View Video Transcript
#Multimedia Software
#Software