I ...bunch of image files named as 1.jpg
in several directories I want to copy that into another.
I tried using the below command (consider 100 folders)
find folder/{1..100} -type f -name '1.*' -exec cp --backup=numbered "{}" folder/new/ \;
but the file extension get changed as below
1.jpg.~1~
1.jpg.~2~
1.jpg.~3~
...
I am expecting my output should look something like below
1.~1~.jpg
1.~2~.jpg
1.~3~.jpg
...
(or)
1(1).jpg
1(2).jpg
1(3).jpg
...
Note: I am using {1..100}
so that folder order starts from 1, 2, 3, 4...100
and not as 1, 10, 11,...100, 2, 20, 21, 22...
Is there any way I could find and copy images without changing the file extension?
Thank you in advance!
