How do I copy just the path of a file to the clipboard


I would like to copy just the path of a file to the clipboard

As an example:

I have a file whose full path name is


When I select the above file, I would like to copy just the path which is


to the Clipboard

I can see there's a command


But that copies E:\Data\ABC\Discussion.doc to the clipboard which is not what I need.

Any help would be appreciated.


Does it need to work in flat mode or in file collections, or do you just want to copy the current path to the clipboard?

This button copies the current path to the clipboard:

<?xml version="1.0"?> <button display="both" effect="gray"> <label>Copy Folder Path</label> <icon1>AE-Icons\AEi-ClipFolder-20.png,0</icon1> <function type="normal"> <instruction>runmode hide</instruction> <instruction>SetClip.exe {sourcepath$|noterm}</instruction> </function> </button>

It uses my small SetClip program and the icon is from one of the AEon packs.

If you need the command to work in flat mode or in file collections then that would need a modifier to {filepath} which gets the parent directory. I can't see such a thing in the manual but such a thing seems useful so I'll file a feature request with GPSoft. For the time being, if you're desperate, it could be done with some VBScript.

I just want to current path to the clipboard

I looked at the command and realised that I must somehow import it into Directory Opus.

I searched through the Help file and in this forum, but I cannot seem to narrow it down.

So I just manually typed

runmode hide
SetClip.exe {sourcepath$|noterm}

into a new button after installing Setclip

Yes it works. Fantastic.

But how do you import the command in with all the labels etc.

Thanks for your help.

Copy the text in the code box to the clipboard, then paste it to a toolbar whilst in customize mode.