2
So I am trying to a procedure of converting images in a directory, but it just doesn't run at all, and I fail to see what's incorrect in my batch code:
FOR /R %a in (*.png) DO (
files\pngnq -s 1 -n 16 %~fa
ren *nq8.png "%~na.png"
files\gimconv "%~na.png" --format_style psp --format_endian little --pixel_order faster --image_format index4
del "%~na.png"
)
the error it outputs is in french "in was not expected" (in était inattendu).
EDIT: this is the orginal (working code) code:
set file=*.png
files\pngnq -s 1 -n 16 %file%
ren *nq8.png 12345.png
files\gimconv 12345.png --format_style psp --format_endian little --pixel_order faster --image_format index4
del 12345.png
ren *.gim READY4BIT.gim
Thank you for the clarafication, but your code is half working, it doesn't take the name of the file, it take the first line of the result that
dir
gives you, the volume of disk D: is named blabla – Omarrrio – 2016-01-18T19:10:23.9701Oops. Small mistake. My apologies. We need to add
/b
to thedir
command. Answer updated. – DavidPostill – 2016-01-18T19:11:38.7131That's great! ;) – DavidPostill – 2016-01-18T20:01:33.797