5
4
I have a number of images inside subdirectories of another directory which I'd like to copy to one single directory so all the images are in one place.
After a bit of searching, I found and then modified some things to create this command:
find . -name "z*.jpg" -exec cp '{}' ~/Extracted/ \;
This seemingly worked, however I found that images with the same name would be overwritten, so then I did this:
find . -name "z*.jpg" -exec cp -n '{}' ~/Extracted/ \;
But now images with the same name are simply ignored.
Is there anyway I could do this so every image is copied over and images with the same name are renamed?
While the other answer solved my problem, this solution is much easier to implement. This may be useful in the future.
Thanks! – None – 2014-10-26T22:45:33.223