We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
I love this tool, and I've been using it for a while now. I ran into a problem when I tried using it on my Program Files. When I enter
Get-FolderSize -FolderName Notepad++
I get the error
parsing "Notepad++" - Nested quantifier +. At C:\Program Files\WindowsPowerShell\Modules\PSFolderSize\1.6.9\Functions\Private\Get-FolderList.ps1:58 char:21 + ($_.BaseName -match "$FolderName") -and + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], ArgumentException + FullyQualifiedErrorId : System.ArgumentException
I noticed this is caused by lines 54 and 65 in PSFolderSize/PSFolderSize/Functions/Private/Get-FolderList.ps1.
($_.FullName -match ".+$FolderName.+") -and
($_.BaseName -match "$FolderName") -and
I was able to fix it by using [Regex]::Escape, recommended in https://stackoverflow.com/questions/23651862/powershell-how-to-escape-all-regex-characters-from-a-string.
($_.FullName -match (".+" + [Regex]::Escape($FolderName) + ".+")) -and
($_.BaseName -match [Regex]::Escape($FolderName)) -and
Thank you for your time.
The text was updated successfully, but these errors were encountered:
I will work on adding this in, thanks for the report!
Sorry, something went wrong.
No branches or pull requests
Hi!
I love this tool, and I've been using it for a while now. I ran into a problem when I tried using it on my Program Files. When I enter
I get the error
I noticed this is caused by lines 54 and 65 in PSFolderSize/PSFolderSize/Functions/Private/Get-FolderList.ps1.
I was able to fix it by using [Regex]::Escape, recommended in https://stackoverflow.com/questions/23651862/powershell-how-to-escape-all-regex-characters-from-a-string.
Thank you for your time.
The text was updated successfully, but these errors were encountered: