mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 00:54:04 +01:00
Update cd-crashdumps.ps1
This commit is contained in:
parent
7b942b4fec
commit
3b50516e17
@ -2,7 +2,7 @@
|
||||
.SYNOPSIS
|
||||
Change to the crash dumps folder
|
||||
.DESCRIPTION
|
||||
This PowerShell script changes the working directory to the crash dumps directory.
|
||||
This PowerShell script changes the working directory to the crash dumps directory (Windows only).
|
||||
.EXAMPLE
|
||||
PS> ./cd-crashdumps
|
||||
📂C:\Users\Markus\AppData\Local\CrashDumps
|
||||
@ -13,7 +13,10 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
$Path = Resolve-Path -Path "~/AppData/Local/CrashDumps"
|
||||
[string]$Path = Resolve-Path -Path "~"
|
||||
if (!(Test-Path $Path)) { throw "Home directory at $Path doesn't exist (yet)" }
|
||||
$Path += "\AppData\Local\CrashDumps"
|
||||
if (!(Test-Path $Path)) { throw "Crashdumps directory at $Path doesn't exist (yet)" }
|
||||
Set-Location "$Path"
|
||||
"📂$Path"
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user