fix casing for supplied path
This commit is contained in:
@@ -770,6 +770,16 @@ Function Get-FileSizes {
|
||||
[string]$Units,
|
||||
[int]$Precision=2
|
||||
)
|
||||
|
||||
# Fix drive case so output looks nicer
|
||||
Switch ( $Path.Length ) {
|
||||
1 { $Path = $Path.ToUpper() }
|
||||
{ $_ -gt 1 } {
|
||||
$split = $Path.Split(":")
|
||||
$Path = $split[0].ToUpper() + ":"
|
||||
If ( $split[1] ) { $Path += $split[1] }
|
||||
}
|
||||
}
|
||||
|
||||
# If no path is specified, set $Path to the directory containing user profiles
|
||||
If (-not $Path ) {
|
||||
|
||||
Reference in New Issue
Block a user