Article View: adobe.scripting.indesign
Article #661Re: Open File Dialog Box (JS)
From: Kasyan_Servetsky
Date: Fri, 06 Mar 2009 07:37
Date: Fri, 06 Mar 2009 07:37
27 lines
1112 bytes
1112 bytes
How can I open a dialog box that already points to a specific folder?
var myFolder=Folder("/C/XYZ");
var myMask="INDD:*.indd";
var myFile=myFolder.openDlg("Select Files To Open", myMask, true);
Also, how can I check with the script if there are files within the folder?
var myFolder = Folder.selectDialog("Please select path to files");
if (myFolder!=null) {
var fileList = myFolder.getFiles();
alert("The selected folder contains " + fileList.length + " files.");
}
Technical Details
Message-ID:
<59b823e3.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b823e3.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,f6d6351cc420ac6 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Kasyan_Servetsky@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Open File Dialog Box (JS) Message-ID: <59b823e3.0@webcrossing.la2eafNXanI> Date: Thu, 5 Mar 2009 23:37:15 -0800 References: <59b823e3.-1@webcrossing.la2eafNXanI> Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit