post #1 of 1
Thread Starter 
Howdy all-
I'm having some trouble automating the creation of a file structure for video clips and I wonder if someone here can help. I've tried to use automator, but I'm a newbie and not having much luck.

I recently had a hard drive crash and needed to recover data from the drive. Unfortunately, I was only able to retrieve the clips alone... 474 of them

This is what the file structure is supposed to look like:
A020_0213N4.RDM (folder) > A020_C001_0213N4.RDC (folder) > A020_C001_0213N4_001.R3D (file)

All I have are the ".R3D" files. I would like to automate the process of creating the folders and naming them. As you can see, each folder has a similar name as the R3D file, but not exactly the same.

Short version of what I'm trying to do:
- Create a folder named after the .R3D file name minus the last 4 characters (_001) and add ".RDC" extension.
- Place .R3D file(s) in that folder.
- Create a folder named after .RDC folder name minus 5th, 6th, 7th, 8th, and 9th characters (_C001) and add ".RDM" extension.
- Place all .RDC folders starting with A020 into .RDM folder starting with A020_0213

Long version of what I'm trying to do:

The camera is what generates this file structure. "A020" is the "reel" name. Each time the camera is reloaded with new media (a hard drive or CF card) it will sequentially rename the "reel" number. For instance, the next one would be called "A021".

"C001" is the clip number and "0213N4" is the date with a couple random characters at the end. The "001" at the end of the R3D file is only if the camera records more than 2 gigs in the clip. If it exceeds 2 gigs, the camera will generate a new clip in the same folder with "002" at the end of the file name.

As you may have guessed, there may be multiple RDC folders in a RDM folder. For instance A020_C001_0213N4.RDC, A020_C002_0213N4.RDC , A020_C003_0213N4.RDC and so on. Likewise, there are often multiple R3D files in a RDC folder so I need my automation process to be smart enough to base everything on the file name of the R3D file.

Am I making sense?

Any one here have any ideas?

Much appreciated..