Skip to main content
Taruz
Participant
September 12, 2014
Question

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

  • September 12, 2014
  • 1 reply
  • 841 views

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!

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
September 12, 2014

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

JJMack
Taruz
TaruzAuthor
Participant
September 12, 2014

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.

Inspiring
September 15, 2014

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!


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.