Page 1 of 1

move folder in folder of same name SOLVED

Posted: Thu Feb 22, 2024 8:46 am
by kazzybash
hi, on my laptop I have quite a number of folders that each only contain a folder with the exact same name as the folder they are in. The deepest folder contains files I want. Is there software to move those deepest folders up one level and/or does anyone know how to script this? Thanks for reading! kazzy

Re: move folder in folder of same name

Posted: Thu Feb 22, 2024 8:57 am
by void
To move the folders up in Everything 1.5:
  • Search for:
    "c:\some\path\to\folders\" folder: $name:==$parentname:
  • Select the folders of interest.
  • From the Edit menu, under the Advanced submenu, click Advanced Move to folder.
  • Check Regular expressions.
  • Change the Old format to: ^(.*)\\([^\\]*)$
  • Change the New format to: \1
  • Review the new filenames and click OK.
  • Accept the prompts to replace the folders.

Re: move folder in folder of same name

Posted: Thu Feb 22, 2024 9:16 am
by kazzybash
:idea: This works, phenomenal... I haven't figured out how to make lasagna with Everything, but I a think it will be able to do even that.

Just one last step in this thread...

I only want to move nested folders with the same name when the parentfolder does not have any other files or folders in it.

How should the search command be configured to do this?

thanks a lot again...

Re: move folder in folder of same name

Posted: Thu Feb 22, 2024 9:19 am
by void
folder: $name:==$parentname: sibling-count:0

$name:==$parentname:
sibling-count:

Re: move folder in folder of same name

Posted: Thu Feb 22, 2024 9:23 am
by kazzybash
thanks void!!