ExtendScript – Reveal in finder

How to reveal a folder in finder with ExtendScript

var revealThisInFinder = “~/Desktop/myFolderName”
function revealFolder(folderPath){
    var cleanFolderPath = Folder(folderPath).fsName;//sometimes we get ‘~/Desktop/Folder/NextFolder’. The ‘~’ path won’t work for terminal. This changes it back to “Users/userName/Desktop” format
    var terminalCommand = ‘cd “‘ + cleanFolderPath + ‘” && open .’;
    var result = system.callSystem(terminalCommand)//after effects
   //return result;
//end function

terminal, command line, photoshop ExtendScript, adobe after effects ExtendScript, scripting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s