'Convert a posix path to windows in git bash (terminal or script)?

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?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source