Resolve-PathCase

Returns the real, canonical case of a path.

Syntax

Resolve-PathCase [-Path] <String> [<CommonParameters>]

Description

The .NET and Windows path/file system APIs respect and preserve the case of paths passed to them. This function will return the actual case of a path on the file system, regardless of the case of the string passed in.

If the path doesn't an exist, an error is written and nothing is returned.

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String

The path whose real, canonical case should be returned.

true true (ByPropertyName)

EXAMPLE 1

Resolve-PathCase -Path "C:\WINDOWS\SYSTEM32"

Returns C:\Windows\system32.

EXAMPLE 2

Resolve-PathCase -Path 'c:\projects\carbon'

Returns C:\Projects\Carbon.