// closeAllOpenDocumentsWithoutSaving.jsx // Copyright 2006-2008 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 2.0 /* Description: This script closes all of the currently open documents without saving. You must have at least open document in order for this script to run */ // enable double clicking from the // Macintosh Finder or the Windows Explorer #target photoshop // Make Photoshop the frontmost application // in case we double clicked the file app.bringToFront(); ///////////////////////// // MAIN ///////////////////////// // while there is one or more documents open... while (app.documents.length >=1){ // Close the active document without saving app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); }