Regular Expression to copy current dir name

I tried this, but it copies the entire dir path:

Clipboard COPYNAMES=path REGEXP ".*\\(.*)" "\1"

Also, what regex engine does DOpus use?

You don't want to use Clipboard COPYNAMES to get the current folder name or path, since that command works on the selected items rather than the current directory.

No need for regular expressions here either

Use this instead, which is the same as Edit > Copy Other > Folder Path, except with nopath added:

Clipboard SET {sourcepath$|noterm|nopath}

Regex details documented here:!Documents/Regular_Expression_Syntax.htm

1 Like