You should have and then I wouldn't have wasted an hour!
On a Mac I think you would need to use AppleScript but I am not a Mac programmer.
If you have a PC I would try it there with a few files only to start with.
John, your time is not wasted. I will be copying the files to a laptop with windows and using your code, then copying the files back to the mac. I am not a mac programmer either.