first commit
@@ -0,0 +1,32 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Path to your folder containing images (current directory)
|
||||
set "folder_path=%~dp0"
|
||||
|
||||
echo Folder path: %folder_path%
|
||||
|
||||
REM Counter for renaming
|
||||
set "counter=1"
|
||||
|
||||
REM Loop through each file in the folder
|
||||
for %%F in ("%folder_path%\*") do (
|
||||
echo Processing file: %%F
|
||||
REM Check if the file exists and is not a directory
|
||||
if exist "%%F" if not exist "%%F\" (
|
||||
REM Extract the numeric part from the filename
|
||||
for /f "tokens=3 delims=-." %%A in ("%%~nF") do (
|
||||
REM Rename the file to saree[counter].[extension]
|
||||
for %%X in ("%%~xF") do (
|
||||
ren "%%F" "saree!counter!%%X"
|
||||
echo Renamed "%%~nxF" to saree!counter!%%X
|
||||
)
|
||||
)
|
||||
REM Increment the counter
|
||||
set /a "counter+=1"
|
||||
) else (
|
||||
echo %%F is not a regular file.
|
||||
)
|
||||
)
|
||||
|
||||
pause
|
||||
|
After Width: | Height: | Size: 367 KiB |
|
After Width: | Height: | Size: 379 KiB |
|
After Width: | Height: | Size: 557 KiB |
|
After Width: | Height: | Size: 508 KiB |
|
After Width: | Height: | Size: 522 KiB |
|
After Width: | Height: | Size: 575 KiB |
|
After Width: | Height: | Size: 358 KiB |
|
After Width: | Height: | Size: 316 KiB |
|
After Width: | Height: | Size: 313 KiB |
|
After Width: | Height: | Size: 398 KiB |
|
After Width: | Height: | Size: 453 KiB |
|
After Width: | Height: | Size: 354 KiB |
|
After Width: | Height: | Size: 387 KiB |
|
After Width: | Height: | Size: 405 KiB |
|
After Width: | Height: | Size: 437 KiB |
|
After Width: | Height: | Size: 388 KiB |
|
After Width: | Height: | Size: 388 KiB |
|
After Width: | Height: | Size: 330 KiB |
|
After Width: | Height: | Size: 347 KiB |
|
After Width: | Height: | Size: 371 KiB |
|
After Width: | Height: | Size: 374 KiB |
|
After Width: | Height: | Size: 402 KiB |
|
After Width: | Height: | Size: 374 KiB |