Extendscript: Project File Save Location
I am writing a simple (yet seems to be not-so-simple) script that allows me to save a project file with a preset naming convention, in the same folder I opened my template file.
So to be clear - my workflow is that I have a template project file in each new job folder I start. At the beginning of the job, I open this template project up from whatever job folder I am working out of and save it using my script.
When clicking the "Save" button on my script, a new project file with a preset naming convention will be saved in the same job folder that I initially opened the template project file in.
My question is: How can I get the new file to save in the same fold the template project was opened in? I know I need to replace the "~/Desktop/" in my code below with something else, but I'm not sure what that is.
My code currently looks like this:
SaveButton.onClick = function (){
app.project.save(File (["~/Desktop/"ProjectNumber" + "_" + "ProjectName" + "_v001.aep"]));
}
I am currently using VS Code with the Extendscript extension. Any help is appreciated.
Thanks!