Adding name of folder to file name

Discussion related to "Everything" 1.5 Alpha.
Post Reply
BurrowBird
Posts: 4
Joined: Wed Jun 09, 2021 2:26 pm

Adding name of folder to file name

Post by BurrowBird »

Is there a way to, when batch renaming multiple files, add the name of the container folder to the files?

E.g. I have
Banana/001.txt
Banana/002.txt
Orange/001.txt

and am looking for a way to quickly get

Banana/Banana 001.txt
Banana/Banana 002.txt
Orange/Orange 001.txt

Would it be something like #parent-name:? Except that one doesn't seem to do anything or I don't understand it.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Adding name of folder to file name

Post by therube »

See, Add folder name to rename files.
Note the Rename vs. Advanced Move...
void
Developer
Posts: 17149
Joined: Fri Oct 16, 2009 11:31 pm

Re: Adding name of folder to file name

Post by void »

Select your banana files
In Everything, from the Edit menu, under the Advanced submenu, click Advanced Move to folder.

In the Advanced Move to:
Check regular expressions.
Please try the following old format:
^(.*)\\(.*?)\\(.*?)$
Please try the following new format:
\1\\\2\\\2 - \3
Double and triple check the newly generated filenames.
Click OK.

#parent-name: is currently not working, thanks for letting me know, I've put this on my things to fix list.
BurrowBird
Posts: 4
Joined: Wed Jun 09, 2021 2:26 pm

Re: Adding name of folder to file name

Post by BurrowBird »

That does work, thanks! It would take me years to figure that out myself. I never learned regex. :o
void
Developer
Posts: 17149
Joined: Fri Oct 16, 2009 11:31 pm

Re: Adding name of folder to file name

Post by void »

Everything 1.5.0.1264a fixes an issue with #parent-name: and other 'index' properties not working.
Post Reply