How to convert destpath to /cygdrive/c/Users/etc?

I'm trying to find a way to make a button that will run an rsync command, but rsync for windows is built on Cygwin, and as such only allows paths that follow the "/cygdrive/[driveletter]/Path/to/file" format.

Example: /cygdrive/e/Games/MiSTer/ would need to be converted from E:\Games\MiSTer

I need to have the ending termination (/).

I'm surprised that there is no DOpus filepath modifier code for this to convert backslashes to forward slashes. Could be quite useful for other reasons besides cygwin, like sending commands to an SSH shell. Then I could just use {destpath|noroot|fwslash}. The issue would be figuring out how to get the drive letter alone without the colon.

If double backslashes are understood by Cygwin then you could use escbackslash to get those. See!Documents/Codes_for_passing_paths.htm

Opus also has built-in support for converting paths into the WSL format, which includes forward slashes. Buttons set to WSL Script Function will do that automatically, and that provides another way to run software written for Linux. (It won't match the cygwin path format though.)

Other than that, could use scripting to convert the paths into exactly what you want and then run the tool on them. You can make any changes you want to the path strings that way.

(I'm surprised anything compiled for Windows does not understand Windows path strings.)

Double backslashes do not work for Cygwin-based executables, sadly. But I can whip something up possibly with your information. Thank you.

There's a script here which might work as a starting point:

The default script you get when you create a script button will also show how to loop through selected files, if that is needed.