Generate folder by command line

I hava the command:
@set ASEPRITE=“C:\Program Files (x86)\Steam\steamapps\common\Aseprite\aseprite.exe”
%ASEPRITE% -b template.ase --save-as gifs/{tag}.gif

Where {layer}/{tag} are folders where I want to output my files. The folders doesn’t exist though. And I don’t want to create a folder for each tag I have by hand. Is there a way to automate this?

At the moment Aseprite cannot do this automatically, but it was requested before:

I’ll try to add this feature for v1.2.9.

Thanks! What if I want something like:

foreach layer {
foreach tag{
Make dir;
}
}

So if I have two layers and two tags I’ll have the folders:

Layer_1/tag_1
Layer_1/tag_2
Layer_2/tag_1
Layer_2/tag_2

edit–

Also is there a way to list all layers regardless of them being visible or not?

You could use --list-layers and --list-tags to get the list of tags and layers, and then create the directories. This is for bash-like shells:

layers=$(aseprite -b --all-layers --list-layers sprite.ase)
tags=$(aseprite -b --list-tags sprite.ase)
for layer in $layers ; do
  mkdir $layer
  for tag in $tags ; do
    mkdir $layer/$tag
  done
done

You can use the --all-layers

Oh my god! I just spent my last 2 hours googling my way around to make a script to do that. HAHAHA

Thanks anyway man, best support ever!

Nice! Exactly what I wanted. Thanks again!

1 Like