Skip navigation
Currently Being Moderated

Browse folder with initial directory

Jul 29, 2008 12:05 AM

Hello,

Is it possible to select a file or folder (with a selectdialog) starting from an initial directory?
I would like to have a dialog to select a file starting from the directory where the current activedocument is located.

Anyone who can help me with this?
Thanks in advance!!!

Glen Bal
 
Replies
  • Currently Being Moderated
    1. ,
    Aug 12, 2008 4:45 PM   in reply to Glen_Bal
    Hi Glen,

    What OS? What app? What scripting language?

    Cheers
    Norbert
     
    |
    Mark as:
  • Currently Being Moderated
    3. ,
    Aug 13, 2008 6:32 PM   in reply to Glen_Bal
    Try this

    myFolder=Folder("/C/XYZ")
    myMask="*.indd"
    myFile=myDocs.openDlg("Select Files To Open", myFolder+"/"+myMask, true);

    Regards
    Norbert
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 13, 2008 11:35 PM   in reply to Glen_Bal
    In Norbert's example, set myDocs to the path you want to display before calling openDlg, and then it will open to the correct place.
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2009 8:44 AM   in reply to Gilad D (try67)

    Hi try67:

     

    I saw your post re: browse folder, tried your suggestion, and can't get it to work.  When I browse to the folder I need and select the file to open, it comes up blank.

     

    What I'm trying to do is have the script open the window at a specific folder, allow me to pick the template file I need, and open it on click.

     

    This is what I have so far.  What am I missing?

     

     

         myFolder=Folder("/K/Presentations/Presentation Header Templates");
         myMask="*.indd";
         myDocs="K:\Presentations\Presentation Header Templates";
         myFile=myDocs.openDlg("Select File to Open", myFolder+"/"+myMask, true);

    Thanks.

     

    --Esther

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2009 12:58 AM   in reply to macoris

    Try this:

    var myFolder = Folder("/K/Presentations/Presentation Header Templates");
    var myMask = "InDesign:*.indd";
    var myFile = myFolder.openDlg("Select Files To Open", myMask, true);

     

    If you want to open InDesign templates (indt-files), then change the following line:

    var myMask = "InDesign Templates :*.indt";

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2009 11:03 AM   in reply to Kasyan Servetsky

    Thanks for the response, Kasyan.  I used your suggestion, but I'm still not getting the results I'm looking for.  A window does open allowing me to browse but it opens to the last window that was opened.  Also, when I choose a file, it doesn't open it.  I'm not using InDesign; I'm trying to run it from Acrobat.

     

    Thanks again.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2009 11:09 AM   in reply to macoris

    This works fo indesign, photoshop, estk, etc. But I've never made any scripts in Acrobat. You'd better ask this question in Acrobat scripting forum.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2009 1:09 PM   in reply to Kasyan Servetsky

    Ok.  Thanks.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)