Jay:
Here are two scripts. The first one works very well in my tests. It creates the master folder on the Desktop, and all the other folders are created inside of it. It still copies the entire format of the CF card (directories included) to the proper folders:
global folder_root_name --For you, this would be the name of the game you are shooting, to which the app will attach the date
global CF_count --This will count the cards as you go, so that you don't have to worry about it
global Pict_path --Will be path to primary folder on Desktop; all other folders will be written here
global CF_transfer --Will switch from false to true depending on whether disk is being copied
on run --This is what happens when you first start the application
set CF_transfer to false --No copying going on
set CF_count to 1 --Card counter set to 1
set folder_root_name to (text returned of (display dialog "Please enter name of Primary Desktop folder:" default answer "") & "-" & (my WriteDate(current date))) --You enter the name of the game, but DO NOT enter the date, the WriteDate handler will do it for you.
my MakeBaseFolders(folder_root_name) --The main folder on the Desktop is created, and the extra folders are placed therein
end run
on idle --This loop fires every 3 seconds
if (list disks) contains "EOS_DIGITAL" and CF_transfer = false then --If the CF card is in the list of disks, and CF_transfer state is false, we get sent to the DownLoadImages handler
my DownLoadImages()
end if
return 3
end idle
on DownLoadImages()
set CF_transfer to true --Switch the state to true, so that nobody will bother us whilst the download is happening
tell application "Finder"
set CF_folder to make new folder at Pict_path with properties {name:(folder_root_name & "-" & CF_count)} --make the folder to hold the card images
duplicate entire contents of disk "EOS_DIGITAL" to CF_folder --Copy all the CF card contents to the new folder
eject disk "EOS_DIGITAL" --eject the CF card
end tell
set CF_count to CF_count + 1 --Set the counter up 1
set CF_transfer to false --reset the transfer state to false in preparation for the next CF card
end DownLoadImages
to WriteDate(dt) --Creates a date string to tag onto the root folder name
return (dt's month as number) & "/" & dt's day & "/" & (characters 3 thru 4 of (dt's year as string))
end WriteDate
on MakeBaseFolders(rtnm)
set extra_Folders to {"Quarterfinals", "Semifinals", "Finals"}
tell application "Finder"
set Pict_path to make new folder at desktop with properties {name:rtnm} --This is now the main folder to hold all the card folders as well
repeat with an_folder in extra_Folders
make new folder at Pict_path with properties {name:(rtnm & "-" & (contents of an_folder))} --make the extra folders
end repeat
end tell
end MakeBaseFolders
This second one does the same, except that it copies a single image at a time, and upon verification of the new file’s data equalling the original file, deletes the original from the card. I cannot test it out for you, so give it a go and let me know what happens. It should NOT copy the entire folder structure of the CF card, but rather a single image at a time. If it does (by some miracle) work as advertised, I would be extremely curious to know how long it took to process x number of images.
global folder_root_name --For you, this would be the name of the game you are shooting, to which the app will attach the date
global CF_count --This will count the cards as you go, so that you don't have to worry about it
global Pict_path --Will be path to primary folder on Desktop; all other folders will be written here
global CF_transfer --Will switch from false to true depending on whether disk is being copied
on run --This is what happens when you first start the application
set CF_transfer to false --No copying going on
set CF_count to 1 --Card counter set to 1
set folder_root_name to (text returned of (display dialog "Please enter name of Primary Desktop folder:" default answer "") & "-" & (my WriteDate(current date))) --You enter the name of the game, but DO NOT enter the date, the WriteDate handler will do it for you.
my MakeBaseFolders(folder_root_name) --The main folder on the Desktop is created, and the extra folders are placed therein
end run
on idle --This loop fires every 3 seconds
if (list disks) contains "EOS_DIGITAL" and CF_transfer = false then --If the CF card is in the list of disks, and CF_transfer state is false, we get sent to the DownLoadImages handler
my DownLoadImages()
end if
return 3
end idle
on DownLoadImages()
set CF_transfer to true --Switch the state to true, so that nobody will bother us whilst the download is happening
tell application "Finder"
set CF_folder to make new folder at Pict_path with properties {name:(folder_root_name & "-" & CF_count)} --make the folder to hold the card images
set all_imgs to every file of entire contents of disk "EOS_DIGITAL"
repeat with animg in all_imgs
set n_img to duplicate animg to CF_folder
my TryVerify((POSIX path of (animg as alias)), (POSIX path of (n_img as alias)))
end repeat
eject disk "EOS_DIGITAL" --eject the CF card
end tell
set CF_count to CF_count + 1 --Set the counter up 1
set CF_transfer to false --reset the transfer state to false in preparation for the next CF card
end DownLoadImages
to WriteDate(dt) --Creates a date string to tag onto the root folder name
return (dt's month as number) & "/" & dt's day & "/" & (characters 3 thru 4 of (dt's year as string))
end WriteDate
on MakeBaseFolders(rtnm)
set extra_Folders to {"Quarterfinals", "Semifinals", "Finals"}
tell application "Finder"
set Pict_path to make new folder at desktop with properties {name:rtnm} --This is now the main folder to hold all the card folders as well
repeat with an_folder in extra_Folders
make new folder at Pict_path with properties {name:(rtnm & "-" & (contents of an_folder))} --make the extra folders
end repeat
end tell
end MakeBaseFolders
to TryVerify(orig_file, new_file) --Concept courtesy Adam Bell
set orig_CS to last word of (do shell script "md5 " & (quoted form of orig_file))
set new_CS to last word of (do shell script "md5 " & (quoted form of new_file))
if orig_CS = new_CS then do shell script ("rm -f " & (quoted form of orig_file)) --So long as the numbers agree, the original file should be summarily dismissed..
end TryVerify
Good luck,