mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-30 15:08:49 +02:00
Update list-dir-tree.ps1
This commit is contained in:
parent
e2aaef5499
commit
3ce90ab07c
@ -9,7 +9,7 @@
|
|||||||
PS> ./list-dir-tree.ps1 C:\MyFolder
|
PS> ./list-dir-tree.ps1 C:\MyFolder
|
||||||
├📂Results
|
├📂Results
|
||||||
│ ├📄sales.txt (442K)
|
│ ├📄sales.txt (442K)
|
||||||
(2 folders, 1 file, 442K total)
|
(2 folders, 1 file, 442K file size in total)
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -69,7 +69,7 @@ try {
|
|||||||
[int64]$global:files = 0
|
[int64]$global:files = 0
|
||||||
[int64]$global:bytes = 0
|
[int64]$global:bytes = 0
|
||||||
ListDirectory $Path 0
|
ListDirectory $Path 0
|
||||||
Write-Output " ($($global:folders) folders, $($global:files) files, $(Bytes2String $global:bytes) total)"
|
Write-Output " ($($global:folders) folders, $($global:files) files, $(Bytes2String $global:bytes) file size in total)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user