Marvee Amasi
Marvee Amasi
DIIDevHeads IoT Integration Server
Created by Sterling on 6/14/2024 in #middleware-and-os
Fixing 'Missing Operator' Error in Batch Script for Renaming JPG Files on Windows
Yh something like this
setlocal EnableDelayedExpansion
set filename=file
set counter=0
for /f "usebackq delims=*" %%i in (`dir /b *.jpg`) do (
set /a counter+=1
ren "%%i" "%filename%!counter!.jpg"
)
setlocal EnableDelayedExpansion
set filename=file
set counter=0
for /f "usebackq delims=*" %%i in (`dir /b *.jpg`) do (
set /a counter+=1
ren "%%i" "%filename%!counter!.jpg"
)
7 replies