There are a number of ways and a number of cmdlets to work with file names and file paths, which are collected and summarised here.
The common and most obvious, PowerShell way is to use Join-Path, which actually does a great job and is very good. With PowerShell Core in Linux and macOS it does but the path separator the right way round for the platform, which is good.
When joining multiple path elements you might find this easier:[System.IO.Path]::Combine(".", "foo", "bar")
This works in PowerShell Core on macOS and hence depending on your platform will give you "./foo/bar" or ".\foo\bar" which is nice. The Join-Path equivalent isJoin-Path -Path (Join-Path -Path "." -ChildPath "foo") -ChildPath "bar"
Unless you have PowerShell 6, in which case you can use:Join-Path -Path "." -ChildPath "foo" -AdditionalChildPath "bar"
One issue I found with the Combine approach is that it does not handle the following very well:[System.IO.Path]::Combine(".\", "\foo", "\bar")
This is when Join-Path does actually work better.