mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-12 14:07:20 +02:00
Updated cd-scripts.ps1 and remove-old-dirs.ps1
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user