Skip to main content
Inspiring
May 23, 2017
Answered

How can I open a local folder view by clicking on a link

  • May 23, 2017
  • 2 replies
  • 2483 views

Hello All,

Is there any way to open a local folder (file explorer not a file chooser) from a link in a premiere pro panel? Is this possible using cep API?

Premiere Pro version: 11.1.0

Extension Type: Panel


Thanks & Regards,
Meet Tank

This topic has been closed for replies.
Correct answer e_d_

Yes. (If I was trying to be cheeky I'd stop right here.)

I do it like so:

Win:

window.cep.process.createProcess('C:\\Windows\\explorer.exe','yourAbsoluteFolderPathAsString')

Mac:

window.cep.process.createProcess('/usr/bin/open','yourAbsoluteFolderPathAsString')

2 replies

edit2j47225339
Known Participant
January 15, 2020

Hi, should this method still work? I'm trying this on a mac with this line:

 

window.cep.process.createProcess('/usr/bin/open','Volumes/.../90834_Render_Log.txt');

 

I took away part of the path for securty reasons. When I try to run this within my CEP panel it gives me the error 'window is not defined'. Do I need to do something to define 'window'?

 

EDIT: I figured it out. I had put the code in the premiere.jsx but it needs to be in the index.html. It works now.

e_d_Correct answer
Inspiring
May 23, 2017

Yes. (If I was trying to be cheeky I'd stop right here.)

I do it like so:

Win:

window.cep.process.createProcess('C:\\Windows\\explorer.exe','yourAbsoluteFolderPathAsString')

Mac:

window.cep.process.createProcess('/usr/bin/open','yourAbsoluteFolderPathAsString')

Inspiring
May 25, 2017

Thanks e.d.​ I am trying to replace the windows folder path by the environment variable as below:

window.cep.process.createProcess('%WINDIR%\\explorer.exe','yourAbsoluteFolderPathAsString')

But that didn't work. Could you please help me to achieve this?

Thanks,
Meet

Inspiring
May 25, 2017

Hey Meet,

for some reason unknown to me (and so far not explained by the CEF/CEP guys), you have to provide absolute paths. System environment variables will not work direclty AFAIK, they do not seem to get expanded.

In ExtendScript you would use $.getenv("WINDIR") , but how that would be solved in JS+CEP, I don't know (yet).