Reputation: 29876
Suppose you have a path like so:
$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?
PS C:\> $myPath -replace '\\','/'
C:/Python/27
Upvotes: 7
Views: 3021
Reputation: 126722
That's the way I would do it, I'm not familiar with any other (built-in) way.
Upvotes: 3