Skip to content

Instantly share code, notes, and snippets.

@dustinfreeman
Last active December 24, 2019 10:53
Show Gist options
  • Save dustinfreeman/4d86891e004258fb201919f8d94ae6f8 to your computer and use it in GitHub Desktop.
Save dustinfreeman/4d86891e004258fb201919f8d94ae6f8 to your computer and use it in GitHub Desktop.
Bulk-converting tga's to png's in a Unity project, using bash
for f in *.TGA; do mv ./"$f" ./"${f%.TGA}.tga"; done;
for f in *.TGA.meta; do mv ./"$f" ./"${f%.TGA.meta}.tga.meta"; done;
for f in *.tga.meta; do mv ./"$f" ./"${f%.tga.meta}.png.meta"; done;
for f in *.tga; do convert ./"$f" ./"${f%.tga}.png"; done;
# rm *.tga; rm *.tga.meta;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment