mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-06 23:50:09 +02:00
Update open-file-explorer.ps1
This commit is contained in:
@ -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))"
|
||||||
|
Reference in New Issue
Block a user