Recursive set creation date of pictures and videos based on filename
I am not directly answering your question, but you may want to consider another approach. Most cameras record creation date within the file in Exif data.

There are many ways of accessing this, but there is a command line tool jhead http://www.sentex.net/~mwandel/jhead/ This works on many platforms, and has the option to extract Exif times and perform modifications based on these.

I have an Automator Workflow (using jhead) to do this for selected items 
(I would have pasted the workflow, but can't seem to do so.)