ImportOptions object

new ImportOptions( file);


The ImportOptions object encapsulates the options used to import a file with the Project.importFile methods.

The constructor takes an optional parameter, an ExtendScript File object for the file. If it is not supplied, you must explicitly setthe valueof the file attribute before using the object with the importFile method. For example:

new ImportOptions().file = new File(myfile.psd”);


Attributes Reference Description
importAs “ImportOptions importAs attribute” The type of file to be imported.
sequence “ImportOptions sequence attribute” When true, import a sequence of files, rather than an individual file.
forceAlphabetical “ImportOptions forceAlphabetical attribute” When true, the “Force alphabetical order” option is set.
file “ImportOptions file attribute” The file to import, or the first file of the sequence to import.


Method Reference Description
canImportAs() “ImportOptions canImportAs() method” Restricts input to a particular file type.

Other Tags

Posted in ImportOptions object and tagged , , , , , , , , , , , , , .