OSX: Execute same command on all files within a folder -
i using command-line tool called tmx (https://github.com/tonybeltramelli/tmxresolutiontool) want execute command on every .png file in folder. how can that?
this how used:
tmxresolutiontool <tmx path> <resize ratio> tmxresolutiontool <image path> <resize ratio> tmxresolutiontool <image path> <new width> <new height> cheers.
find <path> -name "*.png" | xargs -irepl tmxresolutiontool repl <ratio> if need run commands in order on each file before moving next, small bash script may clearer
find <path> -name "*.png" | while read f ; tmxresolutiontool $f <resize ratio> ; tmxresolutiontool $f <resize ratio> ; tmxresolutiontool $f <new width> <new height> ; done
Comments
Post a Comment