If you want to combine the physical path C:\ with a relative path “Temp” in PowerShell, Use Join-Path

 

PS C:\Users\rLisdonk> Join-Path "C:\" "\Temp"
C:\Temp
PS C:\Users\rLisdonk> Join-Path "C:\" "Temp"
C:\Temp
PS C:\Users\rLisdonk> Join-Path "C:" "Temp"
C:\Temp

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.