Move results to a parent folder

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
drivingherethere
Posts: 4
Joined: Tue Jan 31, 2023 8:43 am

Move results to a parent folder

Post by drivingherethere »

Is it possible to move every respective file/folder in the result list to a parent folder?

Result

Code: Select all

Z:\test\test2\438\2900 [20215]\test123
Z:\test\test2\438\3009 [20214]\test1234
Z:\test\test2\438\3002 [20215]\test12345
Z:\test\test2\438\3154 [20219]\test123456
Z:\test\test2\438\3173 [20216]\test1234567
Z:\test\test2\438\3106 [20216]\test12345678
Becomes

Code: Select all

Z:\test\test2\438\2900 [20215]\PARENT\test123
Z:\test\test2\438\3009 [20214]\PARENT\test1234
Z:\test\test2\438\3002 [20215]\PARENT\test12345
Z:\test\test2\438\3154 [20219]\PARENT\test123456
Z:\test\test2\438\3173 [20216]\PARENT\test1234567
Z:\test\test2\438\3106 [20216]\PARENT\test12345678
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Move results to a parent folder

Post by therube »

NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Move results to a parent folder

Post by NotNull »

I think I am overlooking an easier way, but it is possible using regular expressions (regex):
  • Select your files/folders in Everything
  • menu:Edit => Advanced => Advanced Move to Folder
  • Enable Regex
  • Old format = ^(.*\\)(.*)$
  • New format = \1PARENT\\\2
  • Check results
    2023-01-31 22_10_49-Move To.png
    2023-01-31 22_10_49-Move To.png (36.19 KiB) Viewed 2062 times
  • Press the OK button.
  • Done



^ = marks the start of the filename (here including path)
\\ = a literal backslash
.*\\ = read as many characters possible until you find the last backslash
( ) = name the result \1
.* = read the remainder
$ = marks the end of the name (including path)
( ) = name the result \2

Resulting in (example):
\1 = Z:\test\test2\438\3154 [20219]\
\2 = test123456.txt
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Move results to a parent folder

Post by NotNull »

@therube:
the PARENT name is misleading here as it is actually about moving the files to a new subfolder (named PARENT ..)
drivingherethere
Posts: 4
Joined: Tue Jan 31, 2023 8:43 am

Re: Move results to a parent folder

Post by drivingherethere »

NotNull wrote: Tue Jan 31, 2023 9:24 pm @therube:
the PARENT name is misleading here as it is actually about moving the files to a new subfolder (named PARENT ..)
You're right, also thanks for the help, doing it with regex helped me save a lot of time
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Move results to a parent folder

Post by therube »

So the parent is a child.


And on that note, different yet again, but... Merge Directory Structures.
Post Reply