Skip to content

Instantly share code, notes, and snippets.

@corgan2222
Last active March 18, 2021 01:15
Show Gist options
  • Save corgan2222/48cd3bf59add13c95789a300645ca336 to your computer and use it in GitHub Desktop.
Save corgan2222/48cd3bf59add13c95789a300645ca336 to your computer and use it in GitHub Desktop.
Open Windows Explorer with the Folder of the current opened Adobe Premiere/After Effects Project
$x = get-process | ? {$_.MainWindowTitle -like "*Adobe Premiere*"} | Select-Object -ExpandProperty mainwindowtitle
if ($x){
$pp_path = $x.SubString($x.IndexOf("-") + 2, $x.LastIndexOf("\") - $x.IndexOf("-") - 1)
$pp_path -replace ' ', '` '
# echo $pp_path
explorer.exe $pp_path
}else {
$ae = get-process | ? {$_.MainWindowTitle -like "*Adobe After Effects*"} | Select-Object -ExpandProperty mainwindowtitle
$ae_path = $ae.SubString($ae.IndexOf("-") + 2, $ae.LastIndexOf("\") - $ae.IndexOf("-") - 1)
$ae_path -replace ' ', '` '
# echo $ae_path
explorer.exe $ae_path
}
#To use in Stream Deck save as windowTitle.ps1 and then use System open with:
#powershell -windowstyle hidden -ExecutionPolicy ByPass -File "c:\PATHTOFILE\windowTitle.ps1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment