Having trouble using the 'folderize' feature

Bulk Rename Utility How-To's

Having trouble using the 'folderize' feature

Postby Kswitalski » Tue May 23, 2023 6:42 am

Hello everyone.

I'm not terribly computer savvy, so whilst I could feel my way around most of the functionality of the BRU with the aid of the help file, I fail entirely to understand how one should utilise the RegEx box to categorise photos into folders. I have a substantial number of photos to organise into folders based, preferably, on month and year they were taken on.

As is, I have files in the format "YYYY-MM-DD HHMM.jpg" in compliance with ISO 8601. I was wondering if someone could lend a helping hand and suggest what steps to take to sort the files into folders named for example "YYYY MM" based on their file name.

Much appreciated!
Kswitalski
 
Posts: 2
Joined: Tue May 23, 2023 6:30 am

Folderize with Regex

Postby Luuk » Tue May 23, 2023 12:23 pm

The main thing to remember, is that you're just putting "\" into the new-names to invent your folder-paths.
But the Replace-box is glitched, and how it conducts "\" depends on the numbers in your names and how many groups!
If anybody is interested, I did try to explain it here... http://www.bulkrenameutility.co.uk/foru ... f=2&t=5611

So with a "Match" like ^(\d\d\d\d)-(\d\d)(.*) then using \\1 in the Replace wont always put \ in front of \1...
Now-Names -----------------> \1 -------- \\1
1981-04-17 2359 -----------> 1981 ----- \1981 (as expected, putting \ in front of \1==1981)
2023-05-19 2359 -----------> 2023 ----- 05023 (2 removed from 2023, replaced by \2==05)

So if anybody can understand this and explain it better on either of the posts, its much to be appreciated.
The good part is that its very easy to fix, so just always put a checkmark in "v2" and use "\\" to say "\".
Also must verify a checkmark for "Renaming Options, Advanced Options, Allow using \ in Renaming Criteria".

This an example without renaming, to move them like... "YYYY-MM-DD HHMM" ---> "YYYY MM\YYYY-MM-DD HHMM"
But 1st must have a checkmark inside for "v2", so then the "Match" and "Replace" can look something like...
^((?:19|20)\d\d)-(0[1-9]|1[12])-([0-3]\d \d{4})$
\1 \2\\\1-\2-\3

This some other ways to conduct the same, but might look better for editing...
^((?:19|20)\d\d)-(0[1-9]|1[12])-([0-3]\d \d{4})$
$1 $2\\$1-$2-$3

^((?:19|20)\d\d)-(0[1-9]|1[12])-([0-3]\d \d{4})$
$1 $2\\$0

^(\d\d\d\d)-(\d\d)-(\d\d \d\d\d\d)$
$1 $2\\$0

^(\d\d\d\d)-(\d\d)-(\d\d \d\d\d\d)$
$1 $2\\$0

The $0 just says Now-Name, so that you dont need to say all of the groups, to get the whole Now-Name.
For myself I do always prefer using $Groups instead of \Groups, but especially when I'm folderizing.
But its important to understand that the replace-path is relative to the current path.

With everything so far, they move like C:\Path\NowFolder\NowName ----> C:\Path\NowFolder\YYYY MM\NowName
But you can always prefix the path with things like ..\..\ to go upwards 2-folders in the folder-path.
And if uncertain, can conduct just a few files, to see exactly where they did get settled.

If you need to move them to a whole new path, something like "D:\Vacation\MyPics\YYYY MM\NowName".
Then could use Copy/Move(13) with D:\Vacation\MyPics\ with letting regex create "YYYY MM\NowName".
But cannot move upward from this Copy/Move(13) location, can only move downward!
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Having trouble using the 'folderize' feature

Postby Admin » Wed May 24, 2023 2:02 am

To add tho that, maybe using the Simple version of the Regex (see the option Simple in RegxEx(1)) makes it for an easier syntax.
For example:

Gven file name: 1981-04-17 2359

To move in subfolder 1981-04 you could use:

Match: %1-%2-%3
Replace: %1-%2\%1-%2-%3
Admin
Site Admin
 
Posts: 2354
Joined: Tue Mar 08, 2005 8:39 pm

Re: Having trouble using the 'folderize' feature

Postby Kswitalski » Thu May 25, 2023 1:31 pm

Thanks guys, it worked!
Kswitalski
 
Posts: 2
Joined: Tue May 23, 2023 6:30 am


Return to How-To