I'm trying to have the app tablacus explorer open a folder path. This works fine with the following formatting:
$ex = 'S:\Tools\explorer\TE64.exe'
Start-Process $ex -ArgumentList '"Tabs,Close other tabs" "Open,C:\Program Files"'
But I would really like to have the path in a variable ($dir = 'C:\Program Files'
), and I can't seem to get the quotes right so it gets interpreted properly.
Thank you for your help.
I found two solutions for this on the MS Blog:
$Args = @"
"Tabs,Close other tabs" "Open,$dir"
"@
start $ex -ArgumentList $Args
or
start $ex -ArgumentList """Tabs,Close other tabs"" ""Open,$dir"""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With