CLI filename format doesn't work

I’m using Aseprite 1.2.40 and trying to export a bunch of aseprite files as PNGs. The source files are already named nicely (01-foo, 02-bar, etc), so I’d like to preserve the name without the extension. On paper, it seemed easy enough:

aseprite -b 01-foo.aseprite --save-as {title}.png

Unfortunately, this literally exports to a {title}.png file, meaning I can’t export multiple files as a batch. I’ve also tried --filename-format instead of --save-as, but that also doesn’t seem to work. Am I misunderstanding how these flags are supposed to work?

I’m on Linux, for reference.

Hello, would a bash loop work?
Something like

for f in *.aseprite; do
  aseprite -b $f --save-as ${f//.aseprite/}.png;

Yes it’d definitely work (and is what I ended up doing), but it’d be simpler if we could just do it like the aseprite docs seem to suggest. So either this is a bug in aseprite, or it’s working as intended and the documentation should be updated.

Hi @voithos, thanks for reporting this bug. Actually there are some issues/bugs here:

  1. First of all, I think that what you described might be the best/easier use case for {title} when we use -save-as

  2. But {title} alone in -save-as is not being recognized as a -filename-format

  3. Anyway I tried to do this:

    bin/aseprite -b 01-foo.aseprite \
      -filename-format '{path}/{title}.{extension}' \
      -save-as output.png

    And the output was output.png, the {title} was replaced with the title of the filename specified in -save-as, and not the original title (01-foo).

I created this issue on GitHub: Merge PR to fix {title} is not working on -save-as · Issue #3629 · aseprite/aseprite · GitHub

1 Like