4

A few programs/libraries on windows demand windows only paths. So from a git bash terminal I had to do this:

$ export FOO="d:\\path\\to\\folder"

Is there an alternative to this?

deostroll
  • 11,661
  • 21
  • 90
  • 161

1 Answers1

7

I have seen used in the past (for instance by Git itself) the cygpath command.

Convert Unix and Windows format paths, or output system path information

The -u and -w options indicate whether you want a conversion to UNIX (POSIX) format (-u) or to Windows format (-w).


propatience points out in the comments to the example "cygpath -u 'c:\cygwin\cygbuild\build.mak'", using single quote.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250