// use all the files in the Samples folder
var inputFolder = new Folder(app.path + "/Samples/")
// see if we have something interesting
if (inputFolder != null) {
// get all the files found in this folder that are Adobe Photoshop CS5 (.psd format)
var inputFiles = inputFolder.getFiles("*.psd")
// output to the desktop