mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-10 02:24:58 +02:00
Updated cd-repos.ps1
This commit is contained in:
parent
ec33cb8829
commit
be820bb0cf
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script changes the working directory to the folder for Git repositories.
|
This PowerShell script changes the working directory to the folder for Git repositories.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./cd-repos.ps1
|
PS> ./cd-repos.ps1
|
||||||
📂C:\Repos
|
📂C:\Repos (has 33 subfolders)
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -29,7 +29,7 @@ try {
|
|||||||
$path = Resolve-Path $path
|
$path = Resolve-Path $path
|
||||||
Set-Location "$path"
|
Set-Location "$path"
|
||||||
$subfolders = Get-ChildItem $path -attributes Directory
|
$subfolders = Get-ChildItem $path -attributes Directory
|
||||||
"📂$path entered (has $($subfolders.Count) subfolders)."
|
"📂$path entered (has $($subfolders.Count) subfolders)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0])"
|
"⚠️ Error: $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user