Problem 1 : create a file "target.txt" in folder A. Right-click it to create a Shortcut "Shortcut.lnk" within the same folder. Drag target.txt to Folder B. Click target.lnk. Nothing happens. Dopus doesn't pick up that the target has moved and doesn't adjust the .lnk target location accordingly.
Problem 2 : create a file "target.txt" in folder A. Right-click it to create a Shortcut "Shortcut.lnk" within the same folder. Change the name of target.txt. Click target.lnk. Nothing happens. Dopus doesn't pick up that the target name has changed and doesn't adjust the .lnk target location accordingly.
Neither of these problems occur if I carry out the same procedure in Windows Explorer. I am using Win 7.
Are you sure you're talking about shortcuts & not hardlinks? If i do the same in Explorer, moving the target file elsewhere, the link wouldn't find the target either.
You could modify your button to use the command Copy MAKELINK=hardlink, which would allow to do what you want, unless it's between different hard drives.
My Windows Explorer definitely amends a .lnk shortcut when a target is moved or name changed. All the above is on the same hard drive. Thanks for the advice on hardlink - but I first need to understand why Dopus is treating a simple drag-and-drop of a target differently from Windows Explorer.
I've reproduced the difference you've described between Opus and Explorer. (Ignore Abr and the comments about hardlinks, unless you want an alternative to using shortcuts.)
It looks like Explorer updates the shortcut when you double-click it, since the path inside it then changes and it also then works in Opus again.
So the difference is not in how the shortcut is created originally, nor in what happens when the target file is moved (the drag & drop); it's just what happens when the shortcut is double-clicked for the first time after the target was moved.
There may be a flag we can set to make Opus do the same as Explorer when the double-click happens, although I'm wondering if we may have made this different intentionally, as it's not always desirable for shortcuts to change by just double-clicking them. We'll look at the code and see.