Skip navigation
Archaic Gentleman
Currently Being Moderated

Get path details with script

Sep 19, 2012 3:18 AM

Tags: #javascript #indesign_cs6 #server_path

From an absolute beginner in both InDesign and java scripting . . .

 

With an InDesign CS6 document already open on my PC . . . can I get the path out of the opened file and save some/all the route folders/sub-folders and document name as variables with javascript?

 

Path is like this:-

 

\\mainserver\PDFWorkflow\Ads\County\GDS\InDesign\Adverts\225501IP.indd

 

Why? Because I want to write a script that gives me a Place dialogue box using some of the variables from the original path.



Place dialgoue script would have a path something like this:-

 

\\mainserver\PDFWorkflow\Ads\variable\GDS\InDesign\Resources\variable





 

 

 
Replies
  • Currently Being Moderated
    Sep 19, 2012 2:44 PM   in reply to Archaic Gentleman

    app.activeDocument.filePath

     

    returns the document's path. This works only on saved documents.

     

    If you want to do any kind of file handling, you should read chapter 3 on file system access in the "JavaScript Tools Guide CS6". Fire up the ESTK and open the Help menu; you'll see the document in that menu.

     

    Peter

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points