Copy/Move from Recursive Search Results

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
Quaraxkad
Posts: 184
Joined: 20 Apr 2014 18:01

Copy/Move from Recursive Search Results

Post by Quaraxkad »

When Quick Searching for files and using the /r option, if you right-click drag+drop the found results, XY expects all of the selected files to be in the parent folder of the first item selected, instead of in the folder where they are actually located.

For example, I created the following files and folders:
D:\Test\file0.txt
D:\Test\folder1\file1.txt
D:\Test\folder2\file2.txt

Viewing the folder "D:\Test", I open Quick Search and search for *.txt /r. The results appear, showing me file0 through file3. I select all three files, and drag+drop them with the left mouse button into another folder. XY aks if I want to preserve the directory structure or merge all source files into the target folder. This works properly.

But If I use the right mouse button to drag+drop, and select any of the options (typically "Copy here" or "Move here", but also in my case "TeraCopy here" or "TeraMove here"), then XY will attempt to process all of the files as if they were in the parent folder of the first selected file, file0.txt, which is in "D:\Test". So the only copy/move operation that is successful is file0.txt; file2.txt and file3.txt both fail. In the case of TeraCopy, we can examine the filepaths that are passed from XY to the TeraCopy shell extension dll:
D:\Test\file0.txt
D:\Test\file1.txt
D:\Test\file2.txt
Back in the XY search results, If I were to select only file1.txt and file2.txt, then copy/move file1.txt would be successful and file2.txt would fail.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

There is a special command for this in the context menu: "Rich Move Here" respectively "Rich Copy Here".

Quaraxkad
Posts: 184
Joined: 20 Apr 2014 18:01

Re: Copy/Move from Recursive Search Results

Post by Quaraxkad »

I do not have those context menu items. Is there an option I have set somewhere that's hidden them? Regardless, is it not possible for this to function as expected so that I can use TeraCopy when needed?

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

If you are dragging from a search results listing (or a branch view) they should be there in the drop context menu. Here is a shot:
To see the attached files, you need to log into the forum.

Quaraxkad
Posts: 184
Joined: 20 Apr 2014 18:01

Re: Copy/Move from Recursive Search Results

Post by Quaraxkad »

I see, I have "Custom drag and drop context menu" disabled. I get only the standard windows shell context menu.
Image

Enabling that option, when I use "Copy Here" or "Move Here" on the custom drag+drop menu, XY uses TeraCopy since I have it set as the default copy handler, and here it passes the correct filepath parameters to TeraCopy for a successful operation. So this is a workaround to the problem, but the Shell Context menu is still broken. :wink:

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

The Shell Context menu is owned by Windows. If it is broken (but I'm not sure about that) then I cannot fix it. :)

Quaraxkad
Posts: 184
Joined: 20 Apr 2014 18:01

Re: Copy/Move from Recursive Search Results

Post by Quaraxkad »

I tested the same thing in an Explorer search results Window. When I drag and drop from Explorer to another Explorer window, that works. When I drag and drop from XY to another XY window, that doesn't work. When I drag and drop from Explorer to XY, that doesn't work. When I drag and drop from XY to Explorer, that works. So regardless of the source (XY or Explorer file search results), if the drop target is Explorer the correct file path parameters are passed. If the drop target is XY, the wrong file path parameters are passed.

I can make another summary video if your system can't reproduce the issue.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

Strange. Here (win8) when I right-drag from Explorer search results two files with different locations to another Explorer window and then choose "copy here" the source locations are lost and both files end up in the same folder.

Misunderstanding?

Quaraxkad
Posts: 184
Joined: 20 Apr 2014 18:01

Re: Copy/Move from Recursive Search Results

Post by Quaraxkad »

admin wrote:Misunderstanding?
Well, sort of...


That is how it works in Windows. Try searching for those files again in Explorer, then right-mouse drag+drop them into an XY window. You'll see that XY copies the first selected file successfully, and then gives you an (Item Not Found) error that the second file cannot be accessed (because it's trying to find it in the parent folder of the first file).

Here's a screenshot of the Explorer search results showing the filenames and their parent folders in the background, in the foreground is the Error message I receive when right-mouse drag+drop those files onto an XY Window. You can see that it's not able to find file1.txt because it's looking for it in folder2.

Image

The same happens when drag+dropping from XY search results to another XY folder.

In short, when the drop target is Explorer, the files copy from their various source folders all merged into the drop-target folder. When the drop target is XY, the source file paths are not passed (or read) correctly and XY assumes that all files are contained in the same folder as the first selected file.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

OK, got it now.

I can reproduce it, and it's actually no surprise -- this has never been supported, and there is a special error message for it:
"The shell does not support dropping search results from multiple locations."
However, the error message does not always show. A bug. :bug: Fix comes.

Tip: Tick Configuration | Menus, Mouse, Safety | Context Menus | Custom drag and drop context menu. It has no such issues.

Quaraxkad
Posts: 184
Joined: 20 Apr 2014 18:01

Re: Copy/Move from Recursive Search Results

Post by Quaraxkad »

* Shell Drop: Now when shell drop is not possible because the dropped items
are from multiple locations you are automatically offered XY's custom drop
menu.
This is excellent, thanks! I rarely drag+Drop items from search results so enabling the giant custom context menu was unnecessary for me, this is a good solution.

I'm curious though about what isn't supported, is it something in Windows or XY? Because dropping from XY searches onto the Desktop or an Explorer window works without error, with all selected files merged into the target. The only time the shell context menu doesn't work is when the drop target is an XY folder/window.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

Well, maybe I'm just doing something wrong. Microsoft's documentation is not always perfect. Whatever, I cannot do it any better. :|

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Copy/Move from Recursive Search Results

Post by TheQwerty »

admin wrote:Well, maybe I'm just doing something wrong. Microsoft's documentation is not always perfect. Whatever, I cannot do it any better. :|
I just find it very curious that copy and paste works fine for this but not drag and drop. :?

EDIT: Although maybe I just don't fully understand the exact issue since I'm not sure how to actually reproduce it.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copy/Move from Recursive Search Results

Post by admin »

The point here is the drop context menu. I hand over the job to the shell even before the shell context menu is shown. So I lose control very early. What happens afterwards (after the user select any of the context menu commands) is completely out of my reach.

Post Reply