If your start folder is myFolder
myFolder.selectDlg() to open dialog with myFolder selected.
... and you must use selectSlg rather than selectDialog' which
"[d]iffers from the object method selectDlg() in that it does not preselect a folder."
according to the JS reference.
from a recent script i did:
var myFolder=Folder(app.activeDocument.filePath).selectDlg("PDF folder:");
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 :-)
var selFolder = "D:\\somefolder\\somefolder\\here_we_are"
var myFolder = Folder(selFolder).selectDlg("Select a folder with InDesign files");
Better to use this:
var selFolder = "/D/somefolder/somefolder/here_we_are"
so that your script works on Macs too.
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¿!
You've got me there. I don't know.
don't wonna 'get you there', but wasn't aware of it till last sunday ...
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();