Question:
Suppose you have a path like so:
1 2 |
$myPath = 'C:\Python\27' |
Is there a more reliable in PowerShell way of converting that path to Unix format than just replacing the \
s like this?
1 2 3 |
PS C:\> $myPath -replace '\\','/' C:/Python/27 |
Answer:
That’s the way I would do it, I’m not familiar with any other (built-in) way.