Move files/folder from multiple source into one target path using windows shell

Off-topic posts of interest to the "Everything" community.
Post Reply
byzod
Posts: 19
Joined: Thu Oct 19, 2023 10:17 am

Move files/folder from multiple source into one target path using windows shell

Post by byzod »

I try to write an autohotkey script to extract content of selected folder to the parent level, but found a problem that the windows shell
movehere
or
copyhere
seems do not support contents from multiple source (details here)

I try to do this because I know Everything can do this: you can search files with the same name from different folders, drag them and it will trigger a standard overwrite warning which is what I want to imitate
(This image shows that I can trigger a overwrite warning for three
t.txt
from 3 different folders, which is unlikely to do so in vanilla explorer without Everything)
1.jpg
1.jpg (185.22 KiB) Viewed 4379 times
However after some search and reading official document, I didn't found a way to construct a custom
FolderItems
that can pass to
Folder.MoveHere
,
FolderItems
have only 1 implemented method:
Item()
which returns a item at given index, there's no
AddItem()
, nor
Append()


@void how do you do this? Are you write your own shell extension for this? Can you provide some information about this please? 🙏

p.s. If it's possible to do the "extract contents of selected folders (or an array of selected folder paths) to parent folder" with Everything command line is also a solution to me
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Move files/folder from multiple source into one target path using windows shell

Post by void »

It's not easy.

Everything uses a virtualized IShellFolder with CDefFolderMenu_Create2 for the context menu.

Everything uses IFileOperation for Edit -> Move to

Everything uses SHFileOperation on XP and earlier for Edit -> Move to
byzod
Posts: 19
Joined: Thu Oct 19, 2023 10:17 am

Re: Move files/folder from multiple source into one target path using windows shell

Post by byzod »

void wrote: Sun Nov 05, 2023 3:59 am It's not easy.

A virtualized IShellFolder with CDefFolderMenu_Create2
Well, then it is my worst guess, I think there's no easy way ;_;
Then I choose live with 99 overwrite warning until I got the courage to mess with shell extension

Thanks for your hard work of Everything, it's really a life changer ♥
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Move files/folder from multiple source into one target path using windows shell

Post by void »

Check out IFileOperation.
Post Reply