Help with Find All/Copy Script

Hi Gang, I am an old unix user and just recently returned in the flavor of a Mac. I have tons of pictures in the .orf format and would like to write a script to:

 Search the Hard drives for that file type
 Then, depending on date, copy it to a specific folder
 If there is an exact copy, only keep one

How hard is this to do? Many thanks. I am very happy to be away from MS again!

this script should find files in tree structure $whereToFind that are less than 5 days old + copy them to $path_to_specific_folder

$path_to_specific_folder="$HOME/myPhotos";
$whereToFind="/"
find $whereToFind -type f -name "*.orf" -mtime -5 -exec cp {} $path_to_specific_folder ";"

For avoiding duplicates, you might want to pull just the file names into a list, and generate MD5 sums of all the files in that list. If two files have the same MD5, they are identical (with a probability which is close enough to certainty for most practical purposes). Remove duplicate MD5s, then copy the remaining files. (If the file format makes it unlikely that two different files will have exactly the same size, that might be good enough, and a lot quicker than MD5 to calculate.)