Skip to main content
Known Participant
November 30, 2012
解決済み

Script to open 2 versions of the same file one JPEG and one TIFF - the nrun action in a batch format

  • November 30, 2012
  • 返信数 1.
  • 5275 ビュー

I have 2 folders of images.  One is a folder of JPEG files that have paths created for the image.  The second folder is an identical image except it is a TIFF file with no path.

I have created an action that takes the path from the JPEG and places it on the TIFF and performs some work for me.  What I can't figure out is how to batch this????

I am thinking i'd need a script to open the first image in each folder run the action then move onto the next image in each folder and so forth.

Any help would be soooo wonderful.

If you know of a script or can point me in a direction that would be great!

このトピックへの返信は締め切られました。
JJMack
Community Expert
Community Expert
December 1, 2012

This is a scripting forum not an action forum.  Your action description seems wrong to me.  You state you have two image folders. One for jpeg images and one for Tiff images. Then you go on and state in your action you take the path for the jpeg image and place it on the tiff image for tiff image has no path.  If you do that the tiff images and the jpeg images would be in the same folder not two different folders??? Also if the Tiff image is a file and not just a new open document without a backing file the backing tiff file does have a path.  Folders have paths.

If you creating more then a single image file for image you may want to look into the Image Processor script that ships with Photoshop or the Image Processor Pro script that can be downloaded from Russell Brown's web site.  They can include actions recorded by you in their processing....

The one that shipped with Photoshop can be found in the Bridge from menu Tools>Photoshop>Image Processor.  From Photoshop menu File>Scripts>Image Processor.

JJMack
Known Participant
December 1, 2012

Thanks JJMack,

I do think this is a scripting question.  I only mentioned the action as to give a wholistic view of what i am trying to do. I also think there may be a little mis understanding on the path.

To clarify,

I have 2 identical images one is a tiff one is a jpeg.  They are in separate folders or i can put them in the sam efolder it doesn't matter. 

I think i need a script that will oped the two matching images then run an action (the action requires both images open to work) then move onto the next 2 images.

eg:

open 001.jpg and 001.tiff - run action

open 002.jpg and 002.tiff - run action

.....

I hope this clarifys things a little more.

JJMack
Community Expert
Community Expert
December 1, 2012

Yes you would need to write a script to do that.  The script would need to have a dialog or prompt for the input folders.  If  a single folder file with the same name should sort together. In any case the script would need to retrieve a files list(s) and match file names and logic to skip files that can not be paired. Script have no problem retrieving file list and running actions on open files.  Action the require two open files may have a problem switching between files it there are more then two documents open

For your example if the sequence  Open 001.jpeg, open 001.tif do action.  001.tif would be the active document when the action starts to run. 001.jpeg would be previous or next document Photoshop document chain  links the first and last so if you step off the last document in a forward next step you fall on the first document and if you step backwards previous step off the first you land on the last. Care must also be exercised if in action play an other for action can add to the document ring opening files or creating additional document. Design your action process well. All Saving should be done back in the script after the action does its work. Script can use logic in the save process.

If you do not have programming skills you will have a hard time. There are a lot of script example in this forum.  You can find example that  get list of file in a folder it would also be possible to get a list of jpeg files in a folder as will as a list of tiff files in a folder.  You can also sort file list scripting is programming its work.

Message was edited by: JJMack

JJMack