How do I change them from the capital letters format to the small one,
that is, from "CIMGxxxx.JPG" to the "cimgxxxx.jpg" format.
On 03 Nov 2018, Aelius Gallus wrote:Your incantation worked like a charm!. I don't know how you figured it out because it is very long and complicated for me to remember. I copied it
How do I change them from the capital letters format to the small one,
that is, from "CIMGxxxx.JPG" to the "cimgxxxx.jpg" format.
First, make a copy of the directory, in case whatever you try messes
things up somehow. Even if you think that you changed the names
correctly, take a look at a couple of photographs afterward to be sure.
I'd probably cd into the directory with the photographs then do
something like,
for i in * ; do mv "$i" /tmp/photo ; mv /tmp/photo "`echo "$i" | tr
'[A-Z]' '[a-z]'`" ; done
I hope that helps.
-- Mark
Your incantation worked like a charm!. I don't know how you figured it out because it is very long and complicated for me to remember. I copied it
into a file, so I will just copy and paste it next time I need it.
Great, thank you for letting us know it that worked for you. You canThank you for letting us know your sources and adding a short history of
find out about the kind of approach I used from "Unix tools" types of
courses from maybe thirty years ago. Then people started using Perl for
this kind of thing, now probably Python, but, broadly: if it's simple to describe then the older standard command-line BSD tools can probably be
put together somehow to make it happen.
-- Mark
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 54:40:00 |
Calls: | 6,650 |
Calls today: | 2 |
Files: | 12,200 |
Messages: | 5,330,629 |