Include trailing backslash with "Clipboard COPYNAMES" command

I would like "Clipboard COPYNAMES" to include the trailing backslash. How do I do that?

(I have manually typed a backslash at the end of pasting out pathnames 379,341 times over 12 years, and I'm now tired of doing that. I've searched the Help file and online to no avail. Please tell me there's a way to do this. Thanks.)

-- Steve

If you want the \ for both files and folders, or never copy file paths to the clipboard, you can use the Clipboard command's REGEXP argument.

I'm assuming you want to be able to copy both and only have the \ for folders and not for files, in which case:

Use this, with the Function drop-down set to Script Function:

@script vbscript Function OnClick(ByRef ClickData) ClipString = "" For Each SelectedItem In ClickData.Func.sourcetab.Selected If SelectedItem.is_dir Then ClipString = ClipString & SelectedItem.realpath & "\" & vbCrLf Else ClipString = ClipString & SelectedItem.realpath & vbCrLf End If Next DOpus.SetClip ClipString End Function

Change realpath to name if you only want the filenames but the full paths.

Thank you, Leo. That works perfectly. (And your assumption was correct, that I want the backslash appended only at the end of folder names and not at the end of file names.)

BTW, I've never paid much attention to DOpus' scripting. Now that I've actually seen a script, I must say it doesn't look that daunting. (I used to program in Visual Basic; that vbscript looks very similar.) I don't know why, but for some reason I thought DOpus scripts were written in something like html5 or somesuch, which is something I have no idea about whatsoever and would not be interested in learning from the ground up just for DOpus. But vbscript? Why not? I assume it's related to the devil I already know, Visual Basic, right? Where can I find information about it?

Thanks again for the help.

-- Steve

VBScript is very similar to Visual Basic, yeah.

If you google for "VBScript tutorial" or "VBScript beginners" there are loads of guides. I don't know which to recommend as I've not read any of them myself.

I think there used to be ones that just explained the differences for people who already knew VB, which might be the best thing to look for.