Skip to main content
June 27, 2019
Answered

Open Folder based on project path

  • June 27, 2019
  • 1 reply
  • 739 views

Hi

I would like to create a script that will open up a folder based on the projects path within the network on Windows OS.

For example - 'app.project.file.path' gives me /j/JOB/SHOT/FOLDER01/FOLDER02

Ideally I would like the script to launch a folder at the level /j/JOB/SHOT (back 2 directories)

Is there a way I can use the information from the code app.project.file.path and open the desired folder within explorer?

Many thanks

This topic has been closed for replies.
Correct answer Justin Taylor-Hyper Brew

Totally, here's one way to do it:

app.project.file.parent.parent.parent.execute()

1 reply

Justin Taylor-Hyper Brew
Community Expert
Community Expert
June 27, 2019

Totally, here's one way to do it:

app.project.file.parent.parent.parent.execute()

June 27, 2019

Ha! Brilliant!

And so simple thank you so much for your help!

Cheers

Justin Taylor-Hyper Brew
Community Expert
Community Expert
June 27, 2019

Happy to help!