Skip to content

Commit 476ce95

Browse files
author
Markus Fleschutz
committed
Updated some scripts
1 parent 81f89c9 commit 476ce95

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

scripts/list-empty-dirs.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<#
22
.SYNOPSIS
3-
Lists all empty directories in a directory tree
3+
Lists empty directories in a directory tree
44
.DESCRIPTION
55
This PowerShell script scans a directory tree and lists all empty directories.
66
.PARAMETER path
77
Specifies the path to the directory tree (current working directory by default)
88
.EXAMPLE
99
PS> ./list-empty-dirs.ps1 C:\Windows
1010
...
11-
✅ Found 39972 empty directories within 📂C:\Windows in 222 sec
11+
✅ Found 39972 empty directories within 📂C:\Windows in 222s.
1212
.LINK
1313
https://github.com/fleschutz/PowerShell
1414
.NOTES
@@ -28,8 +28,8 @@ try {
2828
$count++
2929
}
3030
Write-Progress -completed " "
31-
[int]$Elapsed = $stopWatch.Elapsed.TotalSeconds
32-
"✅ Found $count empty directories within 📂$path in $elapsed sec"
31+
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
32+
"✅ Found $count empty directories within 📂$path in $($elapsed)s."
3333
exit 0 # success
3434
} catch {
3535
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

scripts/list-read-only-files.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<#
22
.SYNOPSIS
3-
Lists all read-only files in a directory tree
3+
Lists read-only files in a directory tree
44
.DESCRIPTION
55
This PowerShell script scans a directory tree and lists all read-only files.
66
.PARAMETER path
77
Specifies the path to the directory tree (current working dir by default)
88
.EXAMPLE
99
PS> ./list-read-only-files.ps1 C:\Windows
1010
...
11-
✅ Found 107 read-only files within 📂C:\Windows in 50 sec
11+
✅ Found 107 read-only files within 📂C:\Windows in 50s.
1212
.LINK
1313
https://github.com/fleschutz/PowerShell
1414
.NOTES
@@ -29,7 +29,7 @@ try {
2929
}
3030
Write-Progress -completed " "
3131
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
32-
"✅ Found $count read-only files within 📂$path in $elapsed sec"
32+
"✅ Found $count read-only files within 📂$path in $($elapsed)s."
3333
exit 0 # success
3434
} catch {
3535
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

scripts/list-system-files.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.EXAMPLE
99
PS> ./list-system-files.ps1 C:\Windows
1010
...
11-
✅ Found 764 system files within 📂C:\windows in 50 sec
11+
✅ Found 764 system files within 📂C:\windows in 50s.
1212
.LINK
1313
https://github.com/fleschutz/PowerShell
1414
.NOTES
@@ -29,7 +29,7 @@ try {
2929
}
3030
Write-Progress -completed " "
3131
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
32-
"✅ Found $count system files within 📂$path in $elapsed sec"
32+
"✅ Found $count system files within 📂$path in $($elapsed)s."
3333
exit 0 # success
3434
} catch {
3535
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

0 commit comments

Comments
 (0)