Sub topic 10
Controlling sources, destinations, overrides and file names
This chapter covers the settings in the Batch dialog that decide which files go in, where results go, and what they are called. It assumes you can record and play an action, you know the difference between JPEG, PNG, TIFF and PSD, and you have already run a basic Batch (covered in the previous chapter). Most failed batches come from these settings, not from the action itself.
The four areas of the Batch dialog
Open File > Automate > Batch. The dialog has four groups of settings:
- Play: the action set and action to run.
- Source: where the files come from, and how they are opened.
- Destination: what happens to each file after the action finishes.
- Errors: what to do when something goes wrong.
The action does the editing. The Source and Destination settings decide how files enter and leave that action. If the two disagree, you get surprises such as missing files or files saved twice.
Choosing a source
The Source menu has four common choices.
| Source | What it processes | Typical use |
|---|---|---|
| Folder | Every supported file in a folder you pick with **Choose** | Most batch jobs |
| Import | Images from a scanner or camera | Processing as you capture |
| Opened Files | Every document already open in Photoshop | Quick batches on a hand-picked set |
| Bridge | The files currently selected in Adobe Bridge | Selecting files by rating, label or keyword |
With Folder, two checkboxes matter:
- Include All Subfolders processes files in nested folders too. If your destination is also inside the source folder, this can make Photoshop reprocess its own output. Keep the destination outside the source tree.
- Suppress File Open Options Dialogs stops dialogs such as the Camera Raw settings prompt from appearing for each file. Turn it on for unattended runs.
Also consider Suppress Color Profile Warnings. When files carry a profile that differs from your working space, Photoshop normally asks what to do. In a batch that prompt would stall the run on the first mismatched file. Suppressing the warning lets the run continue, but it also hides the mismatch, so check your color settings first.
Override Action "Open" Commands
If your action was recorded with a File > Open step, that step contains the path of the file you used while recording. Playing it in a batch would open the same file again and again.
Override Action "Open" Commands tells Batch to ignore the action's Open step and open the files from the source instead. Follow these rules:
- Turn it on when the action contains an Open step.
- Leave it off when the action has no Open step. Batch then opens the file itself and the action runs on it. Either way works, but a clean action that never opens a file is the easiest to maintain.
- Do not turn it on if the action's Open step is doing something deliberate, for example opening a fixed watermark file. The override replaces that step with the source file, which breaks the action. Place that open inside a different action, or use Place Embedded in the action.
The override works on the Open command at the top of the action. An Open step nested after other work is still skipped, so check the action's step list if results look wrong.
Destination options
The Destination menu has three choices.
- None: files stay open after the action runs. This is useful when testing, but a large folder will leave hundreds of open documents and can exhaust memory.
- Save and Close: each file is saved over the original, then closed. This is destructive. There is no copy, so test on duplicates first.
- Folder: results go to a folder you choose with Choose. Originals are untouched. This is the safe default for almost all jobs.
Override Action "Save As" Commands
This setting is a common source of confusion. An action may contain its own Save As step, recorded with a specific path and format. When Override Action "Save As" Commands is on, Batch does not skip the save. Instead, it replaces the destination and file name of that step with the Batch settings, while keeping the file format and options (such as JPEG quality) recorded in the action.
Consequences:
- The format comes from the action. If the action saved a JPEG, a Batch with this option on writes JPEGs, even if the source files are TIFFs.
- The folder and name come from the Batch dialog.
- If the action has no Save As step and the override is on, nothing extra is saved by the action. Batch with Folder destination saves the file in its original format.
- If the action has a Save As step and the override is off, the file is saved to the path recorded in the action every time, overwriting itself on each pass. You end up with one file, not one per input.
The usual safe combination is: Destination = Folder, Override Action "Save As" Commands on, and an action that ends with a Save As in the format you want (with a Close step if you also want to close it).
File naming
When Destination is Folder, the File Naming area controls the output names. It shows an example name above the fields so you can see the result before running.
Each field is a building block. Pick elements from the menus:
- Document Name (in lowercase, uppercase, or mixed case)
- Serial Number and Serial Letter
- Date formats such as yyyymmdd
- Extension in lowercase or uppercase
A common pattern is Document Name followed by a fixed suffix, such as _web, followed by extension. Type fixed text directly in a field. A source beach.tif then becomes beach_web.jpg.
Things to watch:
- Starting serial number: used with Serial Number elements. Set it to avoid name collisions between runs.
- Extension: always include an extension element. Without it, files are saved without an extension and the operating system cannot open them with the right program.
- Compatibility: tick Windows, Mac OS or Unix to enforce naming rules. Windows is the strictest choice, since it removes characters such as
:and?. Choose it if the files will move between systems. - Name collisions: if two sources produce the same output name (for example
a.tifanda.pngboth becomea.jpg), the second overwrites the first. Add a Serial Number or keep source formats separate.
Errors setting
The Errors menu has two options:
- Stop For Errors: the run halts at the first problem and shows a message. Use it while testing.
- Log Errors To File: the run continues and writes problems to a text file you name with Save As. Use it for large unattended runs, then read the log afterward.
With logging on, a skipped file does not stop the run. Always open the log, because it is the only record of which files failed.
A worked example
Suppose you have a folder ~/shoot/raw with TIFF files and you want 1600-pixel-wide JPEGs in ~/shoot/web, named name_web.jpg.
The action "Resize for Web" has these steps: Image Size (width 1600 px), Save As JPEG (quality 10), Close.
- Create
~/shoot/webbeforehand. Batch will not create a folder for you through the Choose button. - Choose File > Automate > Batch.
- Set Set to your action set and Action to Resize for Web.
- Set Source to Folder, click Choose, and select
~/shoot/raw. - Leave Override Action "Open" Commands off, because the action has no Open step. Turn on Suppress File Open Options Dialogs and Suppress Color Profile Warnings.
- Set Destination to Folder and choose
~/shoot/web. - Turn on Override Action "Save As" Commands.
- Under File Naming, set the fields to Document Name, the text
_web, and extension (lowercase). - Set Errors to Log Errors To File and pick a log path.
- Click OK.
Before running the full folder, copy three files into a test folder and run the same Batch. Confirm the output names and dimensions, then run the real job.
Common mistakes
- Choosing Save and Close on the first test run and overwriting originals.
- Putting the destination folder inside the source folder with subfolders included.
- Leaving Override Save As off, so one file is written repeatedly.
- Forgetting the extension element in File Naming.
- Leaving dialogs enabled, which makes an unattended run wait for input.
Exercise
A batch of 200 TIFF files finishes, but the destination folder contains only one JPEG, and its name is the one recorded in the action. The action ends with Save As JPEG and Close. Destination is set to Folder. What setting is most likely wrong, and what is the fix?
Show answer
Override Action "Save As" Commands is off. The action's recorded Save As path is used for every file, so each result overwrites the previous one. Turn on Override Action "Save As" Commands and set File Naming (for example Document Name plus extension) so each file gets its own name in the chosen folder.
Exercise
You batch-process a folder that contains both site.tif and site.png, saving to JPEG with File Naming set to Document Name plus lowercase extension. What problem can occur, and how do you prevent it?
Show answer
Both files produce site.jpg, so the second one overwrites the first. Add a Serial Number element or a fixed suffix that differs per run, or process the formats in separate source folders with separate destinations.