Cannot 'Paste Shortcut' in Win Explorer after XY custom copy

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
haddy
Posts: 71
Joined: 28 Dec 2010 16:41

Cannot 'Paste Shortcut' in Win Explorer after XY custom copy

Post by haddy »

Hi,

Im noticing with XYplorer that I cannot 'Paste Shortcut' of a copied file/folder into Windows Explorer if that copy of the file/folder was copied from XYplorer while XY's "custom copy" module is enabled

I mainly Paste Shortcuts of folders.

Is this a known issue?

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

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by admin »

Not sure I understand. You are talking about paste from clipboard, right? But "custom copy" has nothing to do with the clipboard. :?

haddy
Posts: 71
Joined: 28 Dec 2010 16:41

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by haddy »

admin wrote:Not sure I understand. You are talking about paste from clipboard, right? But "custom copy" has nothing to do with the clipboard. :?
Yes, indeed paste from clipboard into a Windows Explorer folder (after doing the Copy of file from XYplorer)

Image

here's a reproduction:

1.) Run latest version (v13.xx) of XYplorer with default 'clean' settings
2.) Go to "My Documents" folder (which is one of the default first install folder tab)
3.) Copy just one file (any file will be ok for this test)
4.) Now minimize XYplorer....
5.) ...In Windows, open any existing folder...
6.) ...Now attempt to do a "Paste Shortcut" of the file that was copied and it is blocked

Copying and then pasting a "Paste Shortcut" of a file works just fine/normal when all done within Windows Explorer, but apparently when the file copy has been made from XYplorer it does not work.

I'm running Windows 7. Thanks for reading Mr Lessau, my fingers crossed it can be investigated

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

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by admin »

Confirmed. I think I have to call this a "known issue", a euphemism for "cannot fix it".

Workaround: Right-mouse drag-drop from XY to WE does offer the "create shortcut" command.

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

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by TheQwerty »

admin wrote:Confirmed. I think I have to call this a "known issue", a euphemism for "cannot fix it".
:shock: As this is s rare occurrence, I became intrigued. :P


Using http://www.freeclipboardviewer.com/ I compared clipboard data when copying from XY and WE, and one difference caught my eye. I noticed that WE set Preferred DropEffect to 5 while XY set it to 1.

Being not that familiar with these parts Google led me to .NET's DragDropEffects enum which I hoped was closely related. Using a small test program showed that, at least in .NET, 1 equals Copy, 5 equals 1 OR 4, and 4 equals Link. Hmmm... :idea:

Back in FreeClipboardViewer I saved the results of an XY copy.

I opened the cl7 file, was dismayed that it was all binary, but at the end was "0100 0000" which corresponded with the hex of Preferred DropEffect. Taking a stab in the dark I tried changing it to "0400 0000". Loaded the new file in FCV, went to Explorer, right-clicked...
screenshot.1.png
Paste is disabled but Paste as Shortcut is enabled - and it works too!

I went back and changed the cl7 file to "0500 0000", rinsed and repeated...
screenshot.2.png
Success all the pastes work!


I didn't have much luck in my initial searching for DropEffect but this eventually led me to a VB6 example of setting CFSTR_PREFERREDDROPEFFECT and the enumeration DROPEFFECT.


Granted, maybe you knew all of this Don, and if so I'm sorry for wasting your time, but if not...
Have you tried registering the CFSTR_PREFERREDDROPEFFECT clipboard format with the DROPEFFECT_LINK flag set?


---------------

Also, just to add a couple more workarounds if Don cannot fix it...
Workaround 2. Right-Clicking the file in XY and selecting Create Shortcut or select File > File Special > Create Shortcut(s) will give you a shortcut that you can then move/cut & paste where you want.

Workaround 3. After copying from XY you could also right-click in Explorer, select New > Shortcut, paste the path into the Create Shortcut dialog, and click next a few times.

Joke Workaround 4. After copying from XY you could use FreeClipboardViewer to save the cl7 file, use a text editor to modify the value of Preferred DropEffect from "0100 0000" to "0500 0000", wish you modified the correct instance, load the modified cl7, and then attempt to Paste Shortcut in Explorer. ;)
To see the attached files, you need to log into the forum.

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

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by admin »

:beer: :beer: :beer: You nailed it!!! :beer: :beer: :beer:

Brilliant, thanks! :appl:

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

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by admin »

BTW, last time I tried it with the DROPEFFECT_LINK flag set was 20071216, and then it did not work for unknown reasons, at which point I gave up on this route. Well, now it works. :biggrin:

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by Enternal »

Amazing TheQwerty! Now that's detective investigation! :shock:

:biggrin: :beer: :beer: :beer:

I'm glad to know that this WAS an actual problem. Encoutered it a couple times before but I thought it was me getting old and forgetting to copy (even though I'm not old :lol:)

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

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by TheQwerty »

Confirming that Paste Shortcut works for me when copying from 13.30.0105, so hopefully haddy can say the same.

Thanks guys! I'm just glad to know I wasn't wasting everyone's time. :)

haddy
Posts: 71
Joined: 28 Dec 2010 16:41

Re: Cannot 'Paste Shortcut' in Win Explorer after XY custom

Post by haddy »

Fan-effin-tastic :biggrin:

A big thank you to TheQwerty for his remedy in solving this. :appl:

Iv'e just tested the BETA v13.30.0105 - 2013-11-21 18:25 - and all is well now, working, thank you. A Wonderful forum.

Post Reply