Updated cd-scripts.ps1 and remove-old-dirs.ps1

This commit is contained in:
Markus Fleschutz
2025-03-19 08:53:19 +01:00
parent 225a1ae902
commit d651aad0f8
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
This PowerShell script changes the working directory to the PowerShell scripts folder.
.EXAMPLE
PS> ./cd-scripts.ps1
📂C:\Repos\PowerShell\scripts
📂C:\Repos\PowerShell\scripts entered (has 644 scripts).
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -16,7 +16,7 @@ try {
$path = Resolve-Path "$PSScriptRoot"
if (-not(Test-Path "$path" -pathType container)) { throw "PowerShell scripts folder at 📂$path doesn't exist (yet)" }
$files = Get-ChildItem $path -attributes !Directory
"📂$path entered, containing $($files.Count) scripts."
"📂$path entered (has $($files.Count) scripts)."
Set-Location "$path"
exit 0 # success
} catch {