You are not logged in.
Pages: 1
I have a 250 thousand images I'm trying to rename in a certain way but I can't seem to achieve it.
This is what I'm going for:
Set#|Shoot#|Image#
001_001_001.jpg
001_001_002.jpg
001_001_003.jpg
001_002_001.jpg
001_002_002.jpg
001_002_003.jpg
001_003_001.jpg
001_003_002.jpg
001_003_003.jpg
002_001_001.jpg
002_001_002.jpg
002_001_003.jpg
002_002_001.jpg
002_002_002.jpg
002_002_003.jpg
002_003_001.jpg
002_003_002.jpg
002_003_003.jpg
003_001_001.jpg
003_001_002.jpg
003_001_003.jpg
003_002_001.jpg
003_002_002.jpg
003_002_003.jpg
003_003_001.jpg
003_003_002.jpg
003_003_003.jpg
I'm obviously not trying to do all of them at once but rather set by set and what's stopping me is the shoot number repeating all the way to the end and not incrementing by 1 at the change of the shoot folder.
Offline
Hi roosterdog22,
here are some essential details missing.
Do you want to do the sequencing without inspecting filename and folders? Or do some or all numbers exist inside the path of the files?
Offline
Hi roosterdog22,
here are some essential details missing.
Do you want to do the sequencing without inspecting filename and folders? Or do some or all numbers exist inside the path of the files?
They are all serialized.
I just want to make it easier for me to identify where I pulled a file from when I use it in a project and to also avoid any naming conflicts.
Thanks for asking.
Offline
I have a 250 thousand images I'm trying to rename in a certain way but I can't seem to achieve it.
Can you provide some examples of input and desired output filenames?
Offline
roosterdog22 wrote:I have a 250 thousand images I'm trying to rename in a certain way but I can't seem to achieve it.
Can you provide some examples of input and desired output filenames?
The screenshot is an example of what I'm trying to achieve however if I were to add multiple folders with varying amounts of images then it doesn't work.
What I need it to do (the 4th rule which is highlighted) is repeat to the end and then increment by 1 after the folder changes and there doesn't appear to be an option for that?
An example of the folder structure:
Set_001
Shoot_001
001.jpg
002.jpg
003.jpg
Shoot_002
001.jpg
002.jpg
003.jpg
Shoot_003
001.jpg
002.jpg
003.jpg
Set_002
Shoot_001
001.jpg
002.jpg
003.jpg
Shoot_002
001.jpg
002.jpg
003.jpg
Shoot_003
001.jpg
002.jpg
003.jpg
Set_003
Shoot_001
001.jpg
002.jpg
003.jpg
Shoot_002
001.jpg
002.jpg
003.jpg
Shoot_003
001.jpg
002.jpg
003.jpg
Each shoot can range anywhere from 50-100 images.
Last edited by roosterdog22 (2022-11-19 22:50)
Offline
It will be a lot simpler to insert parent folder names into the file names.
For example, converting "Set_001\Shoot_002\003.jpg" to "Set_001\Shoot_002\Set_001_Shoot_002_003.jpg".
Then you can delete the unnecessary parts like "Set_" and "Shoot_" to leave you with just "Set_001\Shoot_002\001_002_003.jpg".
A pascal script attached below will insert the two parent folder names:
var
ParentFolder1, ParentFolder2: WideString;
begin
ParentFolder1 := WideExtractFileDir(FilePath);
ParentFolder2 := WideExtractFileDir(ParentFolder1);
ParentFolder1 := WideExtractFileName(ParentFolder1);
ParentFolder2 := WideExtractFileName(ParentFolder2);
FileName := ParentFolder2 + '_' + ParentFolder1 + '_' + FileName;
end.
Offline
Amazing...
Thank you so much for this!
Offline
Pages: 1