Dear friends
I have the following challenge, that I hope one of you could help me solve?
Objective:
Merge 2 Tiff files into one file, and renaming the new merged file file(s) so that the filename would contain our internal code number + the total amount of files in the folder with merged files, and the page number of each file.
Example 1: internal code number _total number of pages_page number+ .tif
Example 2: 2802-02_20tp_01pg.tif
Background:
I have a TIFF file with black lineart, that I would like to merge with the color file. The files are in separate folders, and are named like this
Folder with black files:
01_black, 02_black, 03_black and so on.
Folder with colored files:
01_color, 02_color, 03_color and so on.
The automation process described below, I don't have a problem with, if I only had to perform a PS task on one .tif file. The challenge for me is how to first open one file in one folder, e.g.. "01_black", perform process step 02, 03, 04 and five, then locate file 01_color in the color folder, and perform process step 6-10., then followed by the same procedure for black and color files starting with 02_name.
The normal procedure when merging the files manually would be as follows
01. Open PS
02. Open the black line art file (start with 01_name)
03. "Select all" (cmd+a)
04. Copy (cmd+c)
05. Close the file
06. Open the color file
07. Choose the black channel (cmd+6)
08. Paste (cmd+v) the black file from your clipboard into the black channel
09. Choose all channels (cmd+2)
10. Close the asset
One the above is solved, and I'M left with a folder with the merged files, I need to rename the merged assets to comply with the naming described in the above.
Note: When adding the files to the input folder, it would be in a folder containing the name of the internal code, so I assume you could grab the code number from the folder, and adding it to the files later in the process.
Br. Esben
Merging .tif files, and renaming the files
-
- Newbie
- Posts: 7
- Joined: Wed Jun 20, 2012 2:43 pm
Merging .tif files, and renaming the files
01 and 02 are done by the Open of the PS configurator. Then a "Command" script should take over that does 03 through to 09. You have nicely listed how it has to be done, so it is relatively straightforward. 10 is done by the configurator again, but perhaps it is useful to do that via a script as well because you want to do some manipulation of the file name.
Freddy
Freddy
-
- Newbie
- Posts: 7
- Joined: Wed Jun 20, 2012 2:43 pm
Merging .tif files, and renaming the files
Hi Freddy,
Thank you for the input - great!
When you the steps 3-9 should be handled with a "command!, is it then possible to build this command with the standard tools in Switch, or do I need to write a script?
Br. Esben
Thank you for the input - great!
When you the steps 3-9 should be handled with a "command!, is it then possible to build this command with the standard tools in Switch, or do I need to write a script?
Br. Esben
Merging .tif files, and renaming the files
The "Command" I referred to is the property of the PS configurator. It can be "None", e.g. when all you want is to save an image in a different file format. It can be a "Photoshop action", but that will not work for you, because an action cannot be made to do what you need. It can be "Use script" and that is a PS Javascript. So no, writing that script is not part of the tools of Switch.
Google "photoshop javascript" to get an idea what it takes. I do not know if you are conversant with Javascript. I have already done a few things with PS Javascripts and based on your description of the process steps I think it is not too difficult to do (but the proof of the pudding is always in the eating
).
Freddy
Google "photoshop javascript" to get an idea what it takes. I do not know if you are conversant with Javascript. I have already done a few things with PS Javascripts and based on your description of the process steps I think it is not too difficult to do (but the proof of the pudding is always in the eating

Freddy
-
- Newbie
- Posts: 7
- Joined: Wed Jun 20, 2012 2:43 pm
Merging .tif files, and renaming the files
Ha ha Freddy,
Thank you! You explanation was also my assumption. I have no problems building PS actions, and incorporating them into the workflow, but got stuck with the part were PS have to open files from specific folders, in a structured way.
Ill read up on Google
Thank you for you time and advice
Br. Esben
Thank you! You explanation was also my assumption. I have no problems building PS actions, and incorporating them into the workflow, but got stuck with the part were PS have to open files from specific folders, in a structured way.
Ill read up on Google
Thank you for you time and advice
Br. Esben