diff --git a/Tools.ps1 b/Tools.ps1 index d12a811..691099c 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -778,6 +778,17 @@ Function Get-FileSizes { $IncludeHidden = $false } + # If the path is not an absolute path, make it so + ElseIf ( -not (Test-Path $Path) ) { + $NewPath = $Path[0] + ":\" + If ( -not (Test-Path $NewPath) ) { + Write-Error "Could not find path: ${Path}" + Return + } + $Path = $NewPath + } + } + # Change the sort order depending on which parameter set was specified Switch ( $PSCmdlet.ParameterSetName ) { "largest" { $SortOrder = $true ; $Quantity = $Largest }