How to quote paths on windows? (similar to shlex.quote)

Viewed 710

I need to quote a path in a portable way, shlex.quote is converting slashes to / on windows, which causes the command to fail (using the default windows command prompt).


Returning C:/Users/Me/Documents/Projects/Test

Instead of C:\Users\Me\Documents\Projects\Test


How can I quote a path on windows, similar to shlex.quote that uses native slashes, suitable for the windows command prompt and BAT files?

0 Answers
Related