Batch: number export folders that have the name of a file an earlier source wrote

With the Folder destination, `a.svg` is saved as `destinationFolder/a.svg`.
A later source `a.svg.svg` then got the Export for Screens folder `a.svg`,
which already existed as a file, and its export failed. Batch now numbers a
source's name when its folder or any file it writes in the destination
folder has the name of a file or folder an earlier source wrote, so that
folder is `a.svg-2`.
This commit is contained in:
dotCooCoo
2026-10-29 02:42:05 -07:00
parent 8f377bac81
commit 8a7d83e00f
3 changed files with 99 additions and 11 deletions
+3 -1
View File
@@ -1522,7 +1522,9 @@ already walks Image Trace. Short agent entry points:
named `<document>_<data set>`. Both names drop trailing periods and spaces (`a..svg` gives `a`). The export names
the files in it as it does outside Batch. When two source files have the same name without the extension
(`a.svg` and `sub/a.svg`, `a.svg` and `a.ai`, or `a.svg` and `a..svg`), the folder destination and the overrides
add `-2`, `-3`… to the name for each later file (compared without case), as for data sets.
add `-2`, `-3`… to the name for each later file (compared without case), as for data sets. They also add it when a
later file's folder or file would have the name of a file or folder an earlier one wrote: with the folder
destination, `a.svg` is saved as `a.svg`, so the Export for Screens folder of `a.svg.svg` is `a.svg-2`.
- Image Trace: `imageTrace.presets`, `imageTrace.make {id?, preset?, params?, view?}` (or `imageTrace.makeAndExpand`),
`imageTrace.setView`, `imageTrace.expand`, `imageTrace.release`. A key inside `params` that is not one of the trace
settings, such as `colours`, is an error that names it and the nearest setting (`colors`), as for a command's own keys.