6 Replies Latest reply on Sep 15, 2014 2:15 PM by xbytor2

    Batch save old files in new documents with same name but with one addition.

    Taruz

      Hi, sorry for the confusing headline..

       

      I'm trying to write a script and I'm really having a struggle.

       

      Problem:

      I want to batch save files as new documents, with the old name but with the addition "-fixed".

      The key is that I need to make a fresh file, I can't just duplicate them. I've tried using actions but

      I'm stuck when it comes to renaming the new document with the same name as the old one but with the addition.

       

      This one is pretty close:

      Re: How to copy filename and paste as text in Photoshop

      But I can't seem to get the filename into the copy memory.

       

      Any kind of help would so great.

       

      Thanks!

        • 1. Re: Batch save old files in new documents with same name but with one addition.
          JJMack Most Valuable Participant

          With CS5 or newer you can download the Image Processor Pro automate plug-in script it can name the output files the way you want. Once installed into Photoshop you will fid it under menu File>Automate>Image Processor Pro...  Its dialog looks like this

          Capture.jpg

          • 2. Re: Batch save old files in new documents with same name but with one addition.
            Taruz Level 1

            I know about this, the thing is this though:

             

            I don't want to output a just a copy of the file but with a new name. I specificly needs the content of one file to be paste into another document and then save that as PSD but with the original name of the first document + "-fixed".

            I'm working with PSDs that are locked to a spesific size by our client, the only way of reducing the file size is to make a new document and paste all the layers into that one. Otherwise I get 2GB pdfs even att 72DPI.


            It's soooo anoing.

            • 3. Re: Batch save old files in new documents with same name but with one addition.
              JJMack Most Valuable Participant

              Taruz wrote:

               

              I know about this, the thing is this though:

               

              I don't want to output a just a copy of the file but with a new name. I specificly needs the content of one file to be paste into another document and then save that as PSD but with the original name of the first document + "-fixed".

               

              I don't understand your need  for pasted into and other document. Does the other document have  content or is in a new document are you pasting in each layer or just a composite image.  I don't understand why opening the psd files one at a time re-sizing them to fit within some size and saving  a psd with the filename-fixed.psd is different then what you want. Why the image processor pro dialog set like this does not do what you want.

              Capture.jpg

              • 4. Re: Batch save old files in new documents with same name but with one addition.
                Taruz Level 1

                I've researched some more and my need is actually to remove the metadata, something in the metadata is making the files incompressible when I try to export as PDFs from indesign. One way is to migrate the content to a new PSD. One way is to save them for web but remove the metadata. Neither of these methods are flawless though since they both take too much time and one of the options makes the files flat. This is a very unique problem, I'll post here if I solve it.

                 

                Thanks for your effort though!

                • 5. Re: Batch save old files in new documents with same name but with one addition.
                  JJMack Most Valuable Participant

                  Photoshop treats some meta-data like EXIF data as read only you can not strip that data in a script. The only way to strip some metadata is to use save for Web and that has no PSD option. As you state a new document does not have that type of meta-data and meta-data is not copied when you dupe layers or paste in new layers.

                  • 6. Re: Batch save old files in new documents with same name but with one addition.
                    xbytor2 Level 4

                    exiftool is as command line tool that is great at manipulating metadata regardless of file type. Removing common metadata is as simple as 'exiftool -CommonIFD0= file.psd'.


                    Alternatively, a PS script would need to create a new document based on the current one's properties (size, bit depth, etc...), then copy all of the layers from the old one to the new one and save. As long as there's nothing like layer comps that you have to worry about, you should be ok.