Skip navigation
Currently Being Moderated

JS: Open App Data Folder?

May 7, 2012 6:37 AM

Tags: #script #javascript #indesign #scripting #extendscript #automation

Would this script work for any possible combination of InDesign, platform, and OS version? On my Windows 7 (CS4) I get to see the folder for my own app data, as intended.

 

 

Folder(Folder.userData+"/Adobe/InDesign/Version "+app.version.match(/^\d+\.\d+/)+"/"+$.locale).execute();
 
Replies
  • Currently Being Moderated
    May 7, 2012 6:44 AM   in reply to [Jongware]

    Nope. That folder does not exist on Mac.

     

    What exactly are you trying to do?

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 7:25 AM   in reply to [Jongware]

    But this should do it:

     

    if(File.fs == "Macintosh"){

        File(Folder.userData.parent+"/Preferences/Adobe InDesign/Version "+app.version.match(/^\d+\.\d+/)+"/"+$.locale).execute();

    } else {

        Folder(Folder.userData+"/Adobe/InDesign/Version "+app.version.match(/^\d+\.\d+/)+"/"+$.locale).execute();

    }

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 7:26 AM   in reply to Harbs.

    Although I like this construct a little better...

     

    if(File.fs == "Macintosh"){

        File(Folder.userData.parent+"/Preferences/Adobe InDesign/Version "+parseFloat(app.version)+"/"+$.locale).execute();

    } else {

        Folder(Folder.userData+"/Adobe/InDesign/Version "+parseFloat(app.version)+"/"+$.locale).execute();

    }

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 8:23 AM   in reply to [Jongware]

    Can't you simply use:

     

    File(Folder.appData).execute();

     

    Dave

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 9:40 AM   in reply to [Jongware]

    Yeah. ~/Library is probably a better way to write it...

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 3:19 PM   in reply to Harbs.

    Is it not now hidden anyhows? I only have snow leopard…

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 3:51 PM   in reply to [Jongware]

    I thought user library was hidden from Lion… As for OS's only move from last dot to last dot… Unless they put me old mate oscar back in the trash…

     

    Have you noticed that ~/Advanced Editor is now hidden unless you go back and edit afterwards… Hiding stuff of use must be the new thing…

     
    |
    Mark as:
  • Currently Being Moderated
    May 7, 2012 10:47 PM   in reply to Muppet Mark

    You don't see the Library folder by default, but you can open it using other methods.

     

    Harbs

     
    |
    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