mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 09:28:21 +02:00
Update open-file-explorer.ps1
This commit is contained in:
parent
1f8804fe37
commit
9492c2cbda
@ -16,7 +16,11 @@
|
|||||||
param([string]$Path = "")
|
param([string]$Path = "")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
start-process explorer.exe "$Path"
|
if ("$Path" -ne "") {
|
||||||
|
start-process explorer.exe "$Path"
|
||||||
|
} else {
|
||||||
|
start-process explorer.exe
|
||||||
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user