On 26/11/11 22:44, Chris Walker wrote:
On 25/11/11 16:47, Brett Parker wrote:
OK - so, here we go...
$ find . . ./d space ./d space/c space .jpg;1 ./d space/d space .jpg;1 ./c space ./c space/b space .jpg;1 ./c space/a space .jpg;1 $ find . -type f -name '*.jpg*' -execdir rename 's/.jpg.*$/.jpg/' {} + $ find . . ./d space ./d space/c space .jpg ./d space/d space .jpg ./c space ./c space/b space .jpg ./c space/a space .jpg $
Now, that looks to work to me... but maybe I'm missing something.
I don't think you are but plainly I am!
I found what the problem was. As the files were copied from a DVD, all the folders were read-only. I spotted it while browsing using a Windows box!
I'm going to give up with this as it's really beginning to annoy me. But in time I will take another look at it and see if I can discover why the wretched thing is not working.
As I said, I did give it another go and having changed all the folders by removing the read-only attribute, it works - as you said it would :-)