I'm trying to process a list of files that may or may not be up to date and may or may not yet exist. In doing so, I need to resolve the full path of an item, even though the item may be specified with relative paths. However, Resolve-Path
prints and error when used with a non-existant file.
For example, What's the simplest, cleanest way to resolve ".\newdir\newfile.txt"
to "C:\Current\Working\Directory\newdir\newfile.txt"
in Powershell?
Note that System.IO.Path
's static method use with the process's working directory - which isn't the powershell current location.