extracting from DirName

Advanced Renamer forum
#1 : 12/02-24 16:49
adrian calente
adrian calente
Posts: 3
Under New Name method. I would like to extract the first word from <DirName:1>.
The directory name is Parrott Taverner Consort.
So I would need to extract just the word Parrott
How to go about doing this ?

Thank you


12/02-24 16:49
#2 : 12/02-24 19:52
Miguel
Miguel
Posts: 55
Reply to #1:
I don't really understand what you want to do.
Why do you want to extract the first word (Parrott) from directory name? Do you want to use it in the file name?
Maybe <Word:1> is what you are looking for.
I'm sorry if I can't help you.


12/02-24 19:52
#3 : 12/02-24 21:24
adrian calente
adrian calente
Posts: 3
Thank you for your quick reply.
Yes, I want to use it and then add <NAME> after it.
I should have mentioned that. Apologies.
So Parrott is the first word extracted from <DirName> followed by <NAME>
That would give me a perfect result
Thank you


12/02-24 21:24
#4 : 13/02-24 14:06
Miguel
Miguel
Posts: 55
Reply to #3:
Isn't it easier to add the word Parrott at the beginning of the New Name method?
New name:
Parrott - <Name>
What you want only makes sense if you have multiple files in different folders with different names.
Anyway, try this:
You must use the New Name method 2 times in batch.
1 - New Name:
<DirName> - <Name>

2 - New Name:
<Word:1> - <Name>

Using your example, this give me Parrot - Name of the file.ext and if i add files from others folders add the first word of other folder to the name.

https://i.ibb.co/4FRW7tQ/Captura-13-02-2024-54s. png

Excuse my english.


13/02-24 14:06
#5 : 14/02-24 15:47
adrian calente
adrian calente
Posts: 3
Reply to #4:
That's amazing Miguel. Exactly what I needed.

So pleased you came back to me and didn't give up.


14/02-24 15:47