Updated the Markdown manuals

This commit is contained in:
Markus Fleschutz
2023-12-07 20:24:45 +01:00
parent dafa6cf1d7
commit 1ffd91c5e2
605 changed files with 1927 additions and 1015 deletions

View File

@ -1,15 +1,15 @@
*list-hidden-files.ps1*
================
This PowerShell script scans and lists all hidden files in a directory tree.
This PowerShell script scans a directory tree and lists all hidden files.
Parameters
----------
```powershell
PS> ./list-hidden-files.ps1 [[-DirTree] <String>] [<CommonParameters>]
PS> ./list-hidden-files.ps1 [[-path] <String>] [<CommonParameters>]
-DirTree <String>
Specifies the path to the directory tree
-path <String>
Specifies the path to the directory tree (default is current working dir)
Required? false
Position? 1
@ -25,7 +25,9 @@ PS> ./list-hidden-files.ps1 [[-DirTree] <String>] [<CommonParameters>]
Example
-------
```powershell
PS> ./list-hidden-files.ps1 C:\
PS> ./list-hidden-files.ps1 C:\Windows
...
Found 256 hidden files within 📂C:\Windows in 40 sec
```
@ -42,31 +44,36 @@ Script Content
```powershell
<#
.SYNOPSIS
Lists hidden files in a directory tree
Lists all hidden files in a directory tree
.DESCRIPTION
This PowerShell script scans and lists all hidden files in a directory tree.
.PARAMETER DirTree
Specifies the path to the directory tree
This PowerShell script scans a directory tree and lists all hidden files.
.PARAMETER path
Specifies the path to the directory tree (default is current working dir)
.EXAMPLE
PS> ./list-hidden-files.ps1 C:\
PS> ./list-hidden-files.ps1 C:\Windows
...
✔️ Found 256 hidden files within 📂C:\Windows in 40 sec
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
param([string]$DirTree = "$PWD")
param([string]$path = "$PWD")
try {
$DirTree = resolve-path "$DirTree"
write-progress "Listing hidden files in $DirTree ..."
$stopWatch = [system.diagnostics.stopwatch]::startNew()
[int]$Count = 0
get-childItem "$DirTree" -attributes Hidden -recurse | foreach-object {
"📄 $($_.FullName)"
$Count++
$path = Resolve-Path "$path"
Write-Progress "Scanning $path for hidden files..."
[int]$count = 0
Get-ChildItem "$path" -attributes Hidden -recurse | Foreach-Object {
"📄$($_.FullName)"
$count++
}
"✔️ directory tree $DirTree has $Count hidden file(s)"
Write-Progress -completed " "
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✔️ Found $count hidden files within 📂$path in $elapsed sec"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -74,4 +81,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 10/19/2023 08:11:39)*
*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 12/07/2023 20:24:19)*