Updated the manuals

This commit is contained in:
Markus Fleschutz
2024-03-27 17:36:59 +01:00
parent c5b5cb1c6e
commit aed2b7d940
610 changed files with 1754 additions and 1120 deletions

View File

@ -1,7 +1,7 @@
Script: *check-xml-files.ps1*
========================
This PowerShell script verifies each XML file (with suffix .xml) in the given directory tree for validity.
This PowerShell script verifies any XML file (with suffix .xml) in the given directory tree for validity.
Parameters
----------
@ -27,7 +27,7 @@ Example
```powershell
PS> ./check-xml-files.ps1 C:\Windows
...
Checked 3387 XML files within 📂C:\Windows in 174 sec
Checked 3387 XML files (2462 invalid, 925 valid) within 📂C:\Windows in 116 sec
```
@ -46,13 +46,13 @@ Script Content
.SYNOPSIS
Checks all XML files in a directory tree
.DESCRIPTION
This PowerShell script verifies each XML file (with suffix .xml) in the given directory tree for validity.
This PowerShell script verifies any XML file (with suffix .xml) in the given directory tree for validity.
.PARAMETER path
Specifies the path to the directory tree (current working dir by default)
.EXAMPLE
PS> ./check-xml-files.ps1 C:\Windows
...
✔️ Checked 3387 XML files within 📂C:\Windows in 174 sec
✔️ Checked 3387 XML files (2462 invalid, 925 valid) within 📂C:\Windows in 116 sec
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -63,19 +63,19 @@ param([string]$path = "$PWD")
try {
$stopWatch = [system.diagnostics.stopwatch]::startNew()
$path = Resolve-Path "$path"
[int]$numXmlFiles = 0
Write-Progress "Scanning any XML file within $path..."
[int]$valid = [int]$invalid = 0
Write-Progress "Scanning all XML files within $path..."
Get-ChildItem -path "$path" -attributes !Directory -recurse -force | Where-Object { $_.Name -like "*.xml" } | Foreach-Object {
& $PSScriptRoot/check-xml-file.ps1 "$($_.FullName)"
$numXmlFiles++
if ($lastExitCode -eq 0) { $valid++ } else { $invalid++ }
}
Write-Progress -completed "Done."
[int]$total = $valid + $invalid
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
"✔️ Checked $numXmlFiles XML files within 📂$path in $elapsed sec"
"✔️ Checked $total XML files ($invalid invalid, $valid valid) within 📂$path in $elapsed sec"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -83,4 +83,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-files.ps1 as of 01/25/2024 13:58:37)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-files.ps1 as of 03/27/2024 17:36:25)*