Deleting all but the top layer with the group (Action??)

196 views5 repliesLast post: 11/21/2008
My production workflow involves about 20 PSDs that are updated on a weekly basis. Each PSD has 4 groups with new product images added every week. Every few weeks, to keep file size down, I like to delete all but the most recent product image. I'd like to automate this. I'm curious if this can be done without scripting? As is right now, each layer is given a distinct layer number - If I record an action to delete layers, it only deletes the layers with matching numbers... ie if I record the action to delete layer 147, layer 147 has to be present to make the action work.

Any ideas? If it can't be directly accomodated via an action, can you recommend a change to my workflow that would accomplish my goal?

Thanks
#1
Can't do it to one each week, and fulfill the other 19 with the (new) action?
#2
If the objects needed to delete are just layers, you can do it without scripting. In your action, create two new layers, naming them as you create them. First one "bottom", second one "top". Then using the layer arrange menu command, move "bottom" two down, and then move top one down. "Bottom" should now be below the second layer (first for deletion) and "top" should be above it. Now select layer "top" and merge down twice. You should now have the object you wanted to delete as a predictable layer name ("bottom").

I'd create actions for how ever many objects you add each week and then batch the images based on how many you add.

If you have control of the files, you should be able to create a blank layer inside your group (if groups throw a wrench in the above process) with a known name ("group 1 ref") and then use that name to manage the layer stack in your actions (using the same bottom/top trick).

J
#3
You can do the same thing with groups, and instead of merging down (which the help seems to say is possible), you select group "top", and then shift-select group "bottom" and group x in the middle will be selected (as continuous). Then merge layers will work (the resultant name being "top" this time).
#4
Another option would be a master file -- a blank file the correct size, with guides/ background layers/ type layers/ etc just as you need them. Open old version, pull top layer (shift-drag for placement) over to your master file, then process as you would.
#5
Good suggestions, until I try 'em in the workflow, I can't say they'll all work, but I'll give it a shot.

Thanks
#6