bollob
bollob

Reputation: 37

Can I add something to these commands so they delete original files?

I'm modifying hundreds of pictures with two command lines and I have to manually delete the original files before executing the second command, then delete one more time. Is it possible to add some command to these two commands so it deletes the originals by itself, and to make these two into one row command?

convert * -resize 600x600 -strip *

for f in *.jpg; do cwebp -q 92 -mt $f -o $f.webp; done

Thanks

Upvotes: 0

Views: 78

Answers (1)

bollob
bollob

Reputation: 37

convert * -resize 600x600 -strip * && find -type f ( -name "*jpg" ) -size +1M -delete && for f in *.jpg; do cwebp -q 91 -mt $f -o $f.webp; done && rm *jpg

Upvotes: 1

Related Questions