Reply To: Auto import hundreds of images

#60870

(Looks around) We're in the Scripting forum, right?

someFolder = Folder.selectDialog (“Choose a Folder”);
if (someFolder != null)
{
filenameList = [];
fileList = someFolder.getFiles( function(x) { return x instanceof File && !x.hidden; } );

if (fileList.length > 0)
{
writeFile = File.saveDialog( 'Save File As:' )
if (writeFile != null)
{
if (writeFile.open(“w”))
{
for (i=0; i<fileList.length; i++)
writeFile.write (fileList[i].fsName+”r”);
writeFile.close();
} else
alert (“unable to create file “+writeFile.fsName);
}

} else
alert (“No files found in “+someFolder.fsName);

}

This article was last modified on October 21, 2011

Comments (0)

Loading comments...