Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
What is the best way to convert Dos paths to Posix paths in Powershell? eg given: C:\Program Files\PowerShell\Modules\ I want something like: /Program\ Files/PowerShell/Modules/ Is the only so...
Question
powershell
#2: Post edited
How to convert Dos paths to Unix paths in Powershell
- How to convert Dos paths to Posix paths in Powershell
What is the best way to convert Dos paths to Unix paths in Powershell?- eg given:
- `C:\Program Files\PowerShell\Modules\`
- I want something like:
- `/Program\ Files/PowerShell/Modules/`
- Is the only solution to escape spaces and convert backslashes?
- I've searched the web but couldn't find any existing Powershell function, and the solutions I found didn't mention escaping spaces, so I don't hold much hope that they're complete.
- What is the best way to convert Dos paths to Posix paths in Powershell?
- eg given:
- `C:\Program Files\PowerShell\Modules\`
- I want something like:
- `/Program\ Files/PowerShell/Modules/`
- Is the only solution to escape spaces and convert backslashes?
- I've searched the web but couldn't find any existing Powershell function, and the solutions I found didn't mention escaping spaces, so I don't hold much hope that they're complete.
#1: Initial revision
How to convert Dos paths to Unix paths in Powershell
What is the best way to convert Dos paths to Unix paths in Powershell? eg given: `C:\Program Files\PowerShell\Modules\` I want something like: `/Program\ Files/PowerShell/Modules/` Is the only solution to escape spaces and convert backslashes? I've searched the web but couldn't find any existing Powershell function, and the solutions I found didn't mention escaping spaces, so I don't hold much hope that they're complete.