Glob for multiple file extensions

I’m working on a script that I’m using to rename files from my various digital cameras.  I typically use three cameras when travelling – a DSLR or MILC body, a compact, and my phone.  I want to rename the files with the date the timestamp, prepended to the file name.

I need to find the correct files, and rather than just taking a chance on all files found in a directory, I’d like it to search for specific files. Here are a list of the formats I have:

2015-01-31 08.12.41.mov
00014.MTS
P1000756.MP4
IMG_2102.MOV
C0014.MP4

So to get a list of these files in the current directory, I have the following:

ls -A [C,P]*.MP4 [1-9]*.MTS IMG*.MOV

This gives me a simple list of files that I can feed into the a for loop to read the timestamps and rename the files.

If you noticed that the glob doesn’t include anything to match .mov (lower case) files, this is intended. The only camera I own that produces lowercase .mov files already use a timestamp as the file name.

There are more elegant ways, if you don’t have specific file name conventions that go with specific extensions. Here’s an example:

ls -A [1-9,C,P,I]*.{MOV,MTS,MP4}

Hope this helps someone!