From 476ce9544fd3e1d06633dcb95c3f4c5f01d60f8f Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 2 Jun 2025 19:22:07 +0200 Subject: [PATCH] Updated some scripts --- scripts/list-empty-dirs.ps1 | 8 ++++---- scripts/list-read-only-files.ps1 | 6 +++--- scripts/list-system-files.ps1 | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/list-empty-dirs.ps1 b/scripts/list-empty-dirs.ps1 index 9bb04700..b3c11fc4 100755 --- a/scripts/list-empty-dirs.ps1 +++ b/scripts/list-empty-dirs.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Lists all empty directories in a directory tree + Lists empty directories in a directory tree .DESCRIPTION This PowerShell script scans a directory tree and lists all empty directories. .PARAMETER path @@ -8,7 +8,7 @@ .EXAMPLE PS> ./list-empty-dirs.ps1 C:\Windows ... - ✅ Found 39972 empty directories within 📂C:\Windows in 222 sec + ✅ Found 39972 empty directories within 📂C:\Windows in 222s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -28,8 +28,8 @@ try { $count++ } Write-Progress -completed " " - [int]$Elapsed = $stopWatch.Elapsed.TotalSeconds - "✅ Found $count empty directories within 📂$path in $elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✅ Found $count empty directories within 📂$path in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/scripts/list-read-only-files.ps1 b/scripts/list-read-only-files.ps1 index f180604a..706a9455 100755 --- a/scripts/list-read-only-files.ps1 +++ b/scripts/list-read-only-files.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Lists all read-only files in a directory tree + Lists read-only files in a directory tree .DESCRIPTION This PowerShell script scans a directory tree and lists all read-only files. .PARAMETER path @@ -8,7 +8,7 @@ .EXAMPLE PS> ./list-read-only-files.ps1 C:\Windows ... - ✅ Found 107 read-only files within 📂C:\Windows in 50 sec + ✅ Found 107 read-only files within 📂C:\Windows in 50s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -29,7 +29,7 @@ try { } Write-Progress -completed " " [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "✅ Found $count read-only files within 📂$path in $elapsed sec" + "✅ Found $count read-only files within 📂$path in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/scripts/list-system-files.ps1 b/scripts/list-system-files.ps1 index 015c7325..92abce7d 100755 --- a/scripts/list-system-files.ps1 +++ b/scripts/list-system-files.ps1 @@ -8,7 +8,7 @@ .EXAMPLE PS> ./list-system-files.ps1 C:\Windows ... - ✅ Found 764 system files within 📂C:\windows in 50 sec + ✅ Found 764 system files within 📂C:\windows in 50s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -29,7 +29,7 @@ try { } Write-Progress -completed " " [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "✅ Found $count system files within 📂$path in $elapsed sec" + "✅ Found $count system files within 📂$path in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"