You are not logged in.
Hi,
I have a situation I wish to move many directories, say
Africa - walking 1
Africa - cityscape
UK - London
UK - Cotswalds
Into subdirectories based on the first part of the directory's name. So:
Africa/Africa - walking 1
Africa/Africa - cityscape
UK/UK - London
UK/UK - Cotswalds
I looked for ages for a utility that would do this with no luck, then I found a pascal script that I modified slightly that worked a treat in renamer. But recently my computer died and I lost it.
Now I can't seem to make any progress in finding the script I modified, or making the script again (I have absolutely no clue when it comes to pascal/languages).
I do remember it was only a few lines of code, I'm hoping someone could give some pointers. One of the problems I am having is how to capture the first word of the directory name, do I need to use regex for that?
Offline
You can certainly accomplish this with a Pascal Script rule, but it will be easier to use either a Regular Expressions or a Rearrange rule.
Using a Rearrange rule with the following configuration:
Split using: Exact pattern of delimiters
Delimiter: " - "
New pattern: "$1\$1 - $2"
(exclude the quotes)
Offline
I felt this should be possible and was just trying this last night, but was getting errors because I had just "delimiters" selected.
This works great, thank you.
Offline