Photoshop script. Replace layers from another opened document.
- September 9, 2020
- 4 replies
- 3681 views
Hi all!
I am starting with Photoshop scripting and I am not sure if the functionality I want to achieve is possible or not. It would be awesome if an experienced user could take a look and confirm, and if so, point me in the direction.
Basically I want to replace the layer "LayerA.001" in the targetDocument with the layer "LayerA.002" contained in the sourceDocument.psd, and so on with LayerB.001, C.001, D.001...
Now I can copy layers from one document to another but I can't locate specific layers by name using wildcards and replace them.
The targetDocument.psd contains a real scenario case(layers are duplicated, contained nested groups, clipped adjustment layers..) and the sourceDocument.psd contains the updated versions of these layers to be updated.
I understand that both documents must be open simultaneously, and one of both specifically must be in focus to work. Also, as HardMode, ti would be fantastic to keep the new name in replaced layers (in this sample xxxxx.002).
I provided the two sample files. My photoshop is CS6, I know is quite old, but works for our purposes.
Thank you very much, in advance for the help!!
