Resolve-Path
Turn a relative path into a full path
Resolve-Path -Path .\docs
- Works on
- WindowsLinuxmacOS
- PowerShell
- 5.1 and later
- Reference
- Microsoft Learn: Resolve-Path
Resolves wildcards and relative paths. Throws if the path does not exist. For a path you are about to create, use Join-Path with Get-Location instead.
Try this
Resolve-Path -Path .\docs\*.md
Coming from another shell
| Shell | What you might type |
|---|---|
| bash / zsh | realpath docs |
More in From bash and From cmd.