"Go up" argument does not work with allfilepath?

I am trying this:

Clipboard SET {allfilepath$|..}

But I'm getting the full paths, with filename, rather than parent directory paths.
It works fine with single selected files, with this code:

Clipboard SET {filepath$|..}

Is it not possible with allfilepath by design, or is this a bug?

By design, but the Clipboard command's regexp argument provides a way to do this:

Clipboard COPYNAMES=path REGEXP ^(.*)\\[^\]+$ \1

I don't really want to copy the paths, though. Ultimately, I am trying to program a button to copy the parent folders of all selected items (for use in search results), so my code in the OP was mostly just my way of checking the output to make sure it looked alright. But it feels like nothing is working for me... Not even the following test, to copy one file to a folder selected via a prompt:

Copy {filepath$} TO=ask$

Am I doing it wrong, or is something not working properly? I'm using Directory Opus 11.19.

You're probably best off doing that via scripting. Then you can process the list of selected files as needed (and without restrictions on what you want to do to the list), before giving the list of what you want to copy to a Command object (AddFile method, probably) and telling it to run the Copy command on it.

That also lets you ensure you only copy each folder once, since you may select two files in the same folder.

The example script on the Script Function page loops through all selected files and adds them to a command object (if they pass a test, which wouldn't be relevant here).

The Path object lets you get the parent of a path.