3 Replies Latest reply on May 30, 2018 3:40 AM by selmoh3866054

    Linked Smart Objects - changing the file path via (Hex)Editor or Script?

    selmoh3866054

      I'm not native English.

       

      I have a file with a lot of linked Smart Objects.

       

      The folder for these objects has now been moved. Photoshop no longer finds the files automatically.

       

      This is about the setup of my PSD file:

       

      PSD file with 400 linked Smart Objects.

       

      These were previously on the hard disk like this:

       

      C://Pojekt33/Footage/Angle000/beauty.exr

      C://Pojekt33/Footage/Angle001/beauty.exr

      C://Pojekt33/Footage/Angle002/beauty.exr

      ....

      C://Pojekt33/Footage/Angle399/beauty.exr

       

       

      The new path is now as follows:

       

      C://Pojekt33/Final/Example/Footage/Angle000/beauty.exr

      C://Pojekt33/Final/Example/Footage/Angle001/beauty.exr

      C://Pojekt33/Final/Example/Footage/Angle002/beauty.exr

      ....

      C://Pojekt33/Final/Example/Footage/Angle399/beauty.exr

       

       

      Photoshop is not able to automatically re-link all Smart Objects. Probably because all files have the same name.

       

      Is there a way to have only the part of the file path changed automatically?

      Via Java Script e.g.?

       

      If I look at the PSD file with a HEX editor, I can see the paths clearly (in the XMP).

       

      Here is an excerpt of this file:

       

       

       

      <xmpMM:Ingredients>

                  <rdf:Bag>

                     <rdf:li rdf:parseType="Resource">

                        <stRef:linkForm>ReferenceStream</stRef:linkForm>

                        <stRef:filePath>file:///C://Pojekt33/Footage/Angle000/beauty.exr</stRef:filePath>

                     </rdf:li>

                     <rdf:li rdf:parseType="Resource">

                        <stRef:linkForm>ReferenceStream</stRef:linkForm>

                        <stRef:filePath>file:///C://Pojekt33/Footage/Angle001/beauty.exr</stRef:filePath>

                     </rdf:li>

                     <rdf:li rdf:parseType="Resource">

                        <stRef:linkForm>ReferenceStream</stRef:linkForm>

                        <stRef:filePath>file:///C://Pojekt33/Footage/Angle002/beauty.exr</stRef:filePath>

                     </rdf:li>

       

       

      Now I could simply exchange all paths in a hex editor via "Search and Replace". But when I save the edited PSD, Photoshop doesn't open it anymore. An error then appears. The window will show "EOF - End Of File".

       

      The only possibility now is to reconnect all linked content by hand. This is very complex and takes a long time. Is there another option here?

       

      Thank you very much for your help!