E
E
Eugene2017-07-10 13:20:40
linux
Eugene, 2017-07-10 13:20:40

How to rename files in directories and subdirectories with Imagemagick?

It's not a problem to rename according to a template in a directory, but if I do it according to directories and subdirectories, then I can't rename it. I do so

find /путь/ -type f -iname \*.jpg -exec convert -quality 75 '{}'  \;

Tell me how can I implement this? The file name should change like this: "filename"+"-O.jpg"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor Taran, 2017-07-10
@shambler81

1 if you need to do what I think, then it's much easier for you to use the recommended converter.
or
and run
Your option, by the way, I don't see any "rename files" here

find /путь/ -type f  -regex ".*\(jpg\|jpeg\|JPG\|JPEG\)" -exec convert -quality 75 {}  \;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question