Updated cd-repos.ps1 and cd-scripts.ps1

This commit is contained in:
Markus Fleschutz 2025-03-17 10:40:51 +01:00
parent 5873d0dc1c
commit 225a1ae902
2 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,7 @@ try {
$path = Resolve-Path $path
Set-Location "$path"
$subfolders = Get-ChildItem $path -attributes Directory
"📂$path entered, it has $($subfolders.Count) subfolders."
"📂$path entered, containing $($subfolders.Count) subfolders."
exit 0 # success
} catch {
"⚠️ Error: $($Error[0])"

View File

@ -15,8 +15,9 @@
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."
Set-Location "$path"
"📂$path"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"