Adding name of folder to file name

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

Adding name of folder to file name

Post by BurrowBird » Wed Jun 09, 2021 2:32 pm

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: 3066
Joined: Thu Sep 03, 2009 6:48 pm

Re: Adding name of folder to file name

Post by therube » Wed Jun 09, 2021 5:12 pm

See, Add folder name to rename files.
Note the Rename vs. Advanced Move...

void
Site Admin
Posts: 7532
Joined: Fri Oct 16, 2009 11:31 pm

Re: Adding name of folder to file name

Post by void » Thu Jun 10, 2021 9:29 am

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: 2
Joined: Wed Jun 09, 2021 2:26 pm

Re: Adding name of folder to file name

Post by BurrowBird » Sun Jun 13, 2021 6:50 pm

That does work, thanks! It would take me years to figure that out myself. I never learned regex. :o

void
Site Admin
Posts: 7532
Joined: Fri Oct 16, 2009 11:31 pm

Re: Adding name of folder to file name

Post by void » Fri Jun 18, 2021 6:09 am

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

Post Reply