• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Setting start folder with Folder.selectDialog

Guest
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

Hi there, is it possible to define a start folder when using selectDialog ? It seems to start by default from the desktop, but would it be possible to start the search from let's say C:\some folder\some other folder\my indesign documents ?

This way I can save myself quite some clicks 🙂

Thanks,

Koen

TOPICS
Scripting

Views

9.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Sep 27, 2012 Sep 27, 2012

Hi,

If your start folder is myFolder

use

myFolder.selectDlg() to open dialog with myFolder selected.

hope...

Votes

Translate

Translate
Mentor ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

Hi,

If your start folder is myFolder

use

myFolder.selectDlg() to open dialog with myFolder selected.

hope...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

... and you must use selectSlg rather than selectDialog' which

"iffers from the object method selectDlg() in that it does not preselect a folder."

according to the JS reference.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

Thanks, did the trick indeed

Just in case someone else would like to do this, remember that your folder must have double slashes to make it work, did make me sweat for a while 🙂

example :

var selFolder = "D:\\somefolder\\somefolder\\here_we_are"

var myFolder = Folder(selFolder).selectDlg("Select a folder with InDesign files");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

Better to use this:

var selFolder = "/D/somefolder/somefolder/here_we_are"

so that your script works on Macs too.

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

Hi,

I know it's the URI Path, but as 'D:' is the drivecharacter which is mapped over the drive will it work on a mac¿!

Hans-Gerd Classen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

You've got me there. I don't know.

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

Hi,

don't wonna 'get you there', but wasn't aware of it till last sunday ...

Hans-Gerd

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 27, 2012 Sep 27, 2012

Copy link to clipboard

Copied

from a recent script i did:

var myFolder=Folder(app.activeDocument.filePath).selectDlg("PDF folder:");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 31, 2015 Jul 31, 2015

Copy link to clipboard

Copied

LATEST

Since the title doesn't specify inDesign, and other application users might end up here (like myself), here's how you do it in illustrator:


var dest = Folder(app.activeDocument.path).selectDlg();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines