"Copy AUTOSELECT=yes" not working?

When I use the "AUTOSELECT=yes" argument with the Copy command, newly copied files are not being selected. As a simple example, when selecting a file in the source and executing the button command below, the newly copied file is not being selected.

Copy TO={sourcepath$} AUTOSELECT=yes WHENEXISTS=rename 

Am I missing something or is this a bug?

It may only work when copying to the destination folder (that's what it is designed for), but try using HERE instead of TO={sourcepath$}.

(I assume you're copying out of Flat View or aiming to duplicate files. If duplication, have a look what the standard command for that does inside the Copy Files menu and try adding autoselect to that.)

I just posted that button command as a simple test example (btw, using "HERE" instead of "TO={sourcepath$}" breaks the "WHENEXISTS=rename" argument in this particular button, and it also doesn't select the newly copied files).

My actual use case involves changing the timestamps of files whose paths are stored in the clipboard. It's a kind of "Paste Fresh" command which changes the modified time of files to the current time when pasting them into another folder. So if I copy some files to the clipboard, navigate to another folder, and run the command below, the newly copied files are not selected despite having used "AUTOSELECT=yes". In this case, does the new folder I navigated to count as the destination folder? Or do I need to explicitly include the destination path in the "Copy" command for the autoselect to work?

Option Explicit
Function OnClick(ByRef clickData)
Dim cmd,clipb,citem

Set cmd = ClickData.func.command
Set clipb = DOpus.GetClip("files")
cmd.AddFiles clipb

End Function
1 Like

Got you. That looks like something which at least ought to work. We'll put it on the list.

Maybe there is also an argument for the Clipboard command to support some of the same parameters so you don't need to use scripting to turn the Copy command into a special way to copy files from the Clipboard.

Thanks for considering it. For the Clipboard command, adding some arguments would indeed be quite useful, something like: