rename PNG and jpg files in rows and columns

Post any Bulk Rename Utility support requirements here. Open to all registered users.

rename PNG and jpg files in rows and columns

Postby tiwaz » Mon Oct 08, 2018 10:58 am

like this. i hope you can see it. if yes how to do it .
https://photos.app.goo.gl/1khQckPjUtKzbJiD6

thank you :D
tiwaz
 
Posts: 2
Joined: Mon Oct 08, 2018 10:44 am

Re: rename PNG and jpg files in rows and columns 🎩

Postby Admin » Tue Oct 09, 2018 2:11 am

Hi, it can be done with Javascript renaming, but how would BRU know which file/image gets which name?
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm

Re: rename PNG and jpg files in rows and columns 🎩

Postby tiwaz » Sun Oct 21, 2018 1:13 pm

hi Javascript sorry im new. i know how many w and down . and all png have a time code thank you
tiwaz
 
Posts: 2
Joined: Mon Oct 08, 2018 10:44 am

Re: rename PNG and jpg files in rows and columns 🎩

Postby dude » Mon Oct 22, 2018 5:45 pm

tiwaz wrote:hi Javascript sorry im new. i know how many w and down . and all png have a time code thank you

And the JPG files don't? You're a bit vague ...
What are the current filenames (including timecode)?
dude
 

Re: rename PNG and jpg files in rows and columns 🎩

Postby Admin » Mon Oct 22, 2018 11:51 pm

Hi , can you maybe post before -> after examples of the renaming you need? thanks
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm

Re: rename PNG and jpg files in rows and columns

Postby dude » Wed Oct 31, 2018 9:20 am

Code: Select all
@echo off
setlocal ENABLEDELAYEDEXPANSION
pushd "%~dp0"
cls

::____________________________
::
   set WIDTH=9
   set HEIGHT=4
::____________________________
::


set COUNT=0
set PICTURE=1
for /f "useback delims=" %%a in (`dir /b /o:d *.jpg;*.png`) DO call :AXI "%%a"
goto :EOF



:AXI
   set /a Xco= 1 + (%COUNT% %% %WIDTH%)
   set /a Yco= 1 + (%COUNT%  / %WIDTH%)
   rename %1 "Picture%Picture%_%Yco%_%Xco%.jpg"
   set /a COUNT+=1

   if "%Yco%_%Xco%" == "%HEIGHT%_%WIDTH%" (
      echo DONE with Picture %PICTURE%
      set /a PICTURE+=1
      set COUNT=0
   )
goto :EOF
dude
 


Return to BRU Support


cron