Topic: Group renaming

Hello,

I am working on a new feature and I would like your opinion before finalizing its implementation.
For now it is called "Group renaming". The idea behind is to share information between a number of
related/associated files and use it in a renaming operation.

Its usage can easily be seen to match video and subtitles base names, adding the date a picture was taken
to its name and to its thumbnail file name etc.
Of course, a group of files can be composed of more than two elements.
Two examples are dedicated to this in current Siren's help. It works but needs too many steps.

The solution, of course, changes the expression grammar.
A new "modifier" : < size, pos > must immediately follow the '%' that prefix the variable identifier.
A file group will be defined by a number of consecutive selected files (size).
The file to pick the data from will be identified by its place in the group (pos).

For example, to rename the subtitles : subMov1.srt and st2.srt to match their associated video : Video1.avi, Video2.avi

The files have to be selected : video first, subtitle second
Sel  File
1    Video1.avi
2    subMov1.srt
3    Video2.avi
4    st2.srt

The expression can be : %<2,1>b.%e

%<2,1>     : the group is composed of two elements. The data will be extracted from the first one : the video file
%<2,1>b    : the base name of the video file
%<2,1>b.   : a '.' is added
%<2,1>b.%e : finally the extension of the current file (avi or srt) is added to the new name

The result will be :
Video1.avi
Video1.srt
Video2.avi
Video2.srt

The "<>" modifier can be applied to any variable and to rename raw/jpg/thm : Base name date of jpg picture etc.
the expression could be :  %b - %<3,2>Xdo.%e

Any comments are welcome.

Regards,

Remi

Re: Group renaming

Fine you still improve Siren  big_smile

I think this new option is needed most for video files.
There was such request now and then and we had to use an script or too many steps for and back to do this.
With you newest improvement it seems easy to do.

Could that also be used to serialize groups of files?

Example, serialize every four files:

FROM:

file A abc.ext
file A abc 2.ext
file A haha.ext
file A ooo.ext

file B def.ext
file B def 2.ext
file B hihi.ext
file B uuu.ext

TO:

file A_001.ext
file A_002.ext
file A_003.ext
file A_004.ext

file B_001.ext
file B_002.ext
file B_003.ext
file B_004.ext

USE:
%<4>b(1,6)_%n.%e

???

Re: Group renaming

Hello,

Stefan wrote:

Could that also be used to serialize groups of files?
%<4>b(1,6)_%n.%e

The "<>" will only change the file from which the information is extracted for the variable it associated to. After it has been computed the rest of the expression is treated as normal.
In your expression "%n" is the one of the current file, no particular computation is done here.

For your request, as "%<4>b(1,6)_" will be the same for all files of the group, a standard "%nc" (no collision) will do the trick.

But you are right, maybe a selection number specific to the group can be interesting. I'll think about it.