0

I am currently developing and Adobe Air mobile application and need to convert a large number of files from .png to .atf.

I currently do this by running commands like the one below on every file.

png2atf -c d -r -q 0 -f 0 -i inputFile.png -o outputFile.atf

I've created a batch file and added the commands line by line ...it works but I have to update that every time a file name changes. I've tried a couple of loops I've found around the web ...but haven't managed to get it working. I would really appreciated if some one can help me out with a piece of code that would loop through the files/directories in a the input folder and recreate the structure in an output directory while converting the files.

Thanks.

1 Answer 1

0

I assume that you want to create for Pic001.png the file new converted file Pic001.atf with the same basename but different extension.

Try something like

 for %%f in (*.png) do (
          png2atf -c d -r -q 0 -f 0 -i "%%~nf.png" -o "%%~nf.atf"     
 )

Complete by yourself adding the name of the directories of origin and destination.
You can select all the files and not only the png ones changing (*.png) in (*.*).

1
  • Thanks. Giving it a try later today. Any idea how I would go about recreating the directory structure also. My source directory has several child directories that contain PNGs. Going to try adding a loop for every child dir for now...
    – Iansen
    Sep 15, 2014 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .