2

I've got about 100 tabs open in Photoshop (I've bulk opened them to stack an image). Now I'm getting memory/disk full errors and I need to close all the tabs but one. It's extremely impractical to close all one by one, I need to close all but one. I need to save the one but I can't save due to my scratch disk being almost full, and closing all the 20MP RAWs may help.

How do I close all tabs but one? I am on Photoshop CC 2015.

6
  • Hey Can, I don't know about closing all but 1 tabs though I'm not sure it will help you. Unless you close Photoshop entirely, it tends to keep the disk space that it has used for previously opened documents even after they have been closed individually :/ You could try purging or emptying scratch disks?
    – Jenna
    Jul 24, 2016 at 20:51
  • @Jenna I don't currently have space (I've ordered a new external drive though). however, Photoshop uses whatever is available: a combination of scratch disk space + real RAM. so if I close the other files, it will end up with GBs of usable memory for photoshop. it's allocated by photoshop and will still be used by photoshop so photoshop not deallocating the space wouldn't be a problem. Jul 24, 2016 at 20:57
  • Very good point - I'm afraid I can't find anything useful. All options seem to be close all tabs, which obviously wouldn't work. Was looking for some hacky way, like close all tabs but keep floating windows open, to no avail though. Hope you get it figured out!
    – Jenna
    Jul 24, 2016 at 21:24
  • @Jenna I've also tried experimenting with command/option/shift clicking etc but no avail :) Jul 24, 2016 at 21:27
  • 2
    Heartbreaking, looks like you're gonna have to close so many docs! Perhaps use CTRL/CMD + 'W' rather than clicking the absurdly tiny 'x' in the corner of each tab? I use it to close tabs and when the save notification pops up I hit Y for yes (S for SAVE), N for no and C for cancel. Not a solution but maybe a little quicker.. :)
    – Jenna
    Jul 24, 2016 at 21:42

4 Answers 4

2

Why didn't you open them into a single file? Doesn't help now tho - but it may be quicker to start again? From Bridge: Tools>Photoshop>Load files into Photoshop Layers or from Psd.. File>Scripts>Load files into Stack

1
  • 1
    Yes, that was my bad. I don't know why I went that way. But still, Photoshop needs such an option as many tabbed apps nowadays have such option. Jul 29, 2016 at 9:13
2

I know the post is old but since it was bumped and never got an accepted answer, here's mine. This can be done easily with a script:

// this script will close all inactive documents

// change this to... 'yes' to save changes in the closed documents;
//                   'ask' to prompt the save changes dialogue;
//                   'no' to not save the changes;
var saveChanges = 'no'; 

var doc = activeDocument;

for (var i = documents.length - 1; i >= 0; i--)
{
  if (documents[i] != doc)
  {
    switch (saveChanges)
    {
      case 'yes':
        documents[i].close(SaveOptions.SAVECHANGES);
        break;
      case 'ask':
        documents[i].close(SaveOptions.PROMPTTOSAVECHANGES);
        break;
      case 'no':
        documents[i].close(SaveOptions.DONOTSAVECHANGES);
        break;
      default:
        alert("saveChanges should've been 'yes', 'ask' or 'no' but instead was '" + saveChanges + "', aboring.");
        return false;
    }
  }
}

The script will close all inactive documents with or without saving them. Save the text as a your_name.jsx file to *Path to Photoshop Folder*\Presets\Scripts\, restart Photoshop and it'll be available at File > Scripts > your_name. Then you can run it from the menu, assign to a hotkey or use in an action.

2
  • This script is what i was looking for, minus a couple of things. Could the script ask if changes want to be saved before closing? And in addition, could pressing 'Cancel' stop the script? (so you can deal with that particular doc separately before restarting the script) Cheers! Nov 28, 2019 at 11:24
  • I've updated my answer: now you can set saveChanges to the way you want the script to deal with edited files. In your case change 'no' to 'ask'. And pressing Cancel in a Save dialog will stop the script. Nov 28, 2019 at 14:27
0

As far I've seen there is no way of doing it such way.. but there is a small hack which might save u time

.. don't save your file the one which should not be closed

.. Make sure that file is in your first tab in Photoshop

.. Now close the main window (whole Photoshop)

.. Photoshop closes the windows in the reverse order. Hence by this way all saved files will be closed. And for the unsaved file, pop up box for all such file will be opened displaying the name of the current name of the tags respectively.

Hence, instead of closing each tab by pressing that small 'x' button and giving command to save or not.. this would be a great way to reduce Time

0

I'm on a mac and there must be a similar way to do this on windows. I minimize the file I want open into the dock and then option click one of the close file buttons on the top corner. All the windows close except for the one in the dock.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.