Script to save different TIFF from multiple folders in original location overwriting existent

Explorer ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

Hi to all 🙂

 

I'm looking for an hint or some help to creat a PS script to save different TIFF with different compression type from multiple folders in original location overwriting existent.

 

That is beacause I have to pass different folders into a droplet that has certain action in it.

These folders have lot of LZW compressed TIFF with layers, i want to have the droplet to save the TIFF with layer and ZIP compression in the same folder as the original file overwriting it.

 

I know a little about scripting so any help will be appreciated.

Thanx

Matt

 

TOPICS
Actions and scripting, How to, Mac

Views

1.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct Answers

Adobe Community Professional , Jun 21, 2021 Jun 21, 2021
I can do everything but the saving process pointing to the original folder.. I can save everything on a /Desktop/EXP folder, but i don't know how to point 'the original folder' in the save as dialog when recording the action with wich make the droplet.
Have you used Batch/Droplet before? As I said the following single step action and droplet worked for me, no need for a script: As previously mentioned, my test setup was simple, which may not be the same for your folder structure and ...

Likes

Translate

Translate
Adobe Community Professional , Jun 21, 2021 Jun 21, 2021
Record the single step action with save as, include all the compression requirements as per my screenshot. Don't worry that the action records the explicit filename and filepath used in this file. Use the "override" save as checkbox as shown in the screenshot. Use the save and close option in the droplet. This all worked fine in my tests, I changed none and LZW to ZIP in different folders with different filenames. If you are still having problems, post a screenshot of the expanded action...

Likes

Translate

Translate
Adobe Community Professional ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

EDIT: You could use Image Processor Pro, which can batch up to 10 separate source folders in a single operation.

 

https://sourceforge.net/projects/ps-scripts/files/Image%20Processor%20Pro/v3_2%20betas/

 

Otherwise, if you know a little scripting, map out the process point by point and let for forum know which points you need help on (folder saving code, tiff saving code, batch processing code etc).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

Hi Stephen,

 

thank you for your suggestions.

 

The point is that I would like to make a PS droplet in wich i can drop several folders,

the droplet then processes some action on images and then save the tiffs in same location overwriting existent with a different compression type.

 

I don't want tu use Image Processor because the droplet has to standalone, and should be used on different machines.

 

Does it make sense to you?

 

Thanks

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

Forgive me for asking... When you write "script", do you actually mean "action"? Many use the terms interchangeably, however, they are not the same thing.

 

EDIT: I did write Image Processor Pro, not Image Processor – as I thought you needed the same files processed into different options in different folders in a single run.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

🙂

 

when i write "script" i mean "script".. i think 🙂

 

The point is that when i make the action I use to make my droplet I can make it saving the file, and it keeps the same TIFF settings and saves it in the original folder,

or i can save to a different format (TIFF with ZIP compression), and I can point to a folder (i.e. Desktop/EXP), but i cannot point to a 'Same folder as the original file' folder..

 

Does it make sense to you?

Thank you for your help!

 

Matt

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

OK then... Droplets use actions (just like the Batch command).

 

An action can record a reference to run a script.

 

However, I am also keeping in mind that you wrote:

 

Stephen_A_Marsh_0-1624199124588.png

I don't want tu use Image Processor because the droplet has to standalone, and should be used on different machines.

 

Therefore using a script in an action through a droplet would not be "standalone". The Action is included into the Droplet, however you would still need to install any script referenced by the Droplet/Action on each machine.

 

I would still advise that you map out the process point by point and let for forum know which points you need help on (folder saving code, tiff saving code, batch processing code etc).

 

EDIT: I just tested, all seems to work as expected with just an action and droplet, no need for a script. This was a simple test, it may not be that simple depending on your folder structure and files etc.

 

Have you tested, can you show screenshots of what/where things go wrong?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

Hi Stephen,

 

Thank you for your help!

 

How can I map out the process point by point?

 

Answering your EDIT: Original files are uncompressed TIFFs on layers in multiple folders. I need to pass on the droplet multiples folder, they stands in different structure tree, the action in the droplet then perform some simple edits and should save TIFF with LAYERS with ZIP compression overwriting original TIFFs in the same original folder.

 

I can do everything but the saving process pointing to the original folder.. I can save everything on a /Desktop/EXP folder, but i don't know how to point 'the original folder' in the save as dialog when recording the action with wich make the droplet.

 

attached a screenshot,

thanks!

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

quote

How can I map out the process point by point?

 

When planning a workflow, it is usually good to either make diagrams or list out step by step the process as you see if.

 

Then you test and make adjustments etc.

 

If you are going to script this, then this would become more important.

 

This can also help when trying to explain the process to another person that does not know your workflow or processes.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

Hi Stephen,

 

here's the list point by point:

 

Original files are uncompressed TIFFs on layers in multiple folders. I need to pass on the droplet multiples folder, they stands in different structure tree, the action in the droplet then perform some simple edits and should save TIFF with LAYERS with ZIP compression overwriting original TIFFs in the same original folder.

 

Thank you!

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

Stephen_A_Marsh_0-1624263608269.png

I can do everything but the saving process pointing to the original folder.. I can save everything on a /Desktop/EXP folder, but i don't know how to point 'the original folder' in the save as dialog when recording the action with wich make the droplet.

 

Have you used Batch/Droplet before?

 

As I said the following single step action and droplet worked for me, no need for a script:

 

droplet-setup.png

 

As previously mentioned, my test setup was simple, which may not be the same for your folder structure and files under the folder being processed.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied


@Stephen_A_Marsh wrote:

 

Have you used Batch/Droplet before?


 

Yes!

 


@Stephen_A_Marsh wrote:
Stephen_A_Marsh_0-1624263608269.png

droplet-setup.png

 

As previously mentioned, my test setup was simple, which may not be the same for your folder structure and files under the folder being processed.


 

Ok I try this,

thank you!

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

Hi Stephen,

 

tried your workflow,

it works saving files in the same folder, and this is good, but it doesn't change the compression method of the TIFFs.

 

As I pass folders with uncompressed TIFFs, he saves uncompressed TIFFs.

 

I would like to pass uncompressed TIFFs and save ZIP compressed TIFF.

 

Does it make sense to you?

Thank you!

 

Matt

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

Record the single step action with save as, include all the compression requirements as per my screenshot.

 

Don't worry that the action records the explicit filename and filepath used in this file.

 

Use the "override" save as checkbox as shown in the screenshot. Use the save and close option in the droplet.

 

This all worked fine in my tests, I changed none and LZW to ZIP in different folders with different filenames.

 

If you are still having problems, post a screenshot of the expanded action save as step and a screenshot of the setup used for the droplet.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

Yepppaaa!

Thanks Stephen 🙂

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

LATEST

Glad we got there Matt!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines