Skip to main content
Participant
February 28, 2017
Question

Open another file with same name and copy path

  • February 28, 2017
  • 1 reply
  • 888 views

Hi all. I have an idea for a script to speed up what is essentially a daily task for me. I can do some really simple scripting, but this is way outside of my current skills, as it would involve scripting some Finder actions as well (I think).

What I'm attempting to do is this: Every day we send images out to have them outlined. In order to make the transferring of files quicker, we save the images as full size jpegs and send those out. When they come back, we take the path from the jpeg and copy it back into the original tiff or psd. I'm able to automate the copying of the path from one doc to the next, but what I would really like is to be able to open the original tif and then have the script go to a specific folder on my desktop and open the jpeg there that has the same name as the tiff that I am running the script on. I can then incorporate the copying of paths over using an action.

Any help with that would be much appreciated.

Regards,

Tim

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
February 28, 2017

I would think  that if you are getting jpeg file back into a folder on your desktop that somehow now have have paths. I did not know jpeg file can contain paths. That you would want the script to process the jpeg file in that folder,  Open a Jpeg file, open the original tiff file that has the same name,  copy the path into the tiff document. save the tiff file, close the tiff file, close the jpeg file and move onto the next jpeg file and repeat that process. till all jpeg file have been process.  A single Photoshop script should be able to do that.

JJMack
tJohnsonAuthor
Participant
March 1, 2017

That's sort of the idea. But, it would be better if I opened the tiff that I was ready to retouch, then run the script (from within a photoshop action), to go to the jpeg folder and find the proper file to get the path from (yes, jpegs can have paths). The reason for this is just that the jpegs are always in my download folder. The tiffs are on servers in different folders for individual jobs, or even on different servers for different clients. They aren't all in any particular place each time.

JJMack
Community Expert
Community Expert
March 1, 2017

I disagree. If you ran that script any Tiff you open for retouch would have its path. It would not matter where the tiff files are if when you save the original jpg the Tiff files location could stored in the Jpeg File metadata  for instance in the instructions metadata field.  The batch script would copy the path to the original Tiff file wherever that may be.

JJMack