But I’d like to execute it for all the *.ase files located in my PATH_LOAD folder (including subfloder).
I don’t know much about CMD features, I gave some FOR logic a go without any success.
You can try some of these solutions, anyway I would recommend you to use a Bash script which are easier to program (generally all Git distributions for Windows include some kind of Bash interpreter), where you can do something like:
aseprite=“C:/Program Files (x86)/Steam/steamapps/common/Aseprite/aseprite.exe”
for file in D:/PATH_LOAD/*.ase ; do
$aseprite -b $file --save-as D:/PATH_SAVE/{title}_{tag}_01.png
done
You will need an extra .sh script and call it with a bash interpreter from the .bat file:
"C:\some place where bash is located\bash.exe" other_script.sh
Generally I make all scripts directly on bash language and then call them from the command line using bash script name (without a .bat, but you can use a .bat to double-click it from the Windows Explorer)
That’s a good idea. I’m trying to do as in your example but I don’t know why it doesn’t work.
I made a script.sh file with that inside :
aseprite=“C:/Program Files (x86)/Steam/steamapps/common/Aseprite/aseprite.exe”
for file in D:/PATH_LOAD/*.ase ; do
$aseprite -b $file --save-as D:/PATH_SAVE/{title}_{tag}_01.png
end
But nothing seems to happen. I don’t get what I’m doing wrong.
Thank you for taking the time. That’s nice to take care of newbie
I tried using $aseprite instead of the whole path, I tried to add it in front of the path… I tried several other thing, but this is what I got most of the time :
aseprite=“C:/Program Files (x86)/Steam/steamapps/common/Aseprite/aseprite.exe”
for file in D:/PATH_LOAD/*.ase ; do
"$aseprite" -b $file --save-as D:/PATH_SAVE/{title}_{tag}_01.png
done
(Sorry for the back and forth about this but I’m not on Windows right now to give a try )
I ended up doing the script with bash only. It seems indeed easier to work with.
Right now I’m trying to make an if statement inside a for loop to batch all the *.ase of a folder except for one that I want to save in a different manner.
Does it look remotely like something that could work at some point ?
for file in D:/00_TAKROG/SPRITES/CHARACTERS/*.ase ; do
if [ ${file: -4} == “items.ase” ]; then
“$aseprite” -b --split-layers D:/00_TAKROG/ATLAS_UNIT_AND_DOODADS/items.ase --save-as D:/00_TAKROG/ATLAS_UNIT_AND_DOODADS/{tag}_01.png
fi
done
Hi @J-A_C, I think the issue here is that the filename (D:/00_TAKROG/ATLAS_UNIT_AND_DOODADS/{tag}_01.png) is missing a {layer} part (so each layer goes to a different filename). For example:
My bash script works like a charm. But there one thing I’d like to do is make my script.sh clickable, and for some reason, every command works except the one using aseprite.