Compact Flash to Dated Folder, Please help!

Hi,
I am trying to write a basic script that will copy files from a folder on a compact flash card to a new folder on the desktop. This folder must be named with the current date. I am currently using MacOS 10.2.8

I can create the new folder ok with the following:

set d to day of the (current date)
set m to month of the (current date)
set y to year of the (current date)
tell application "Finder"
	make new folder at desktop with properties {name:d & "_" & m & "_" & y as text}
end tell

I’m becoming stuck on copying to this new folder! How do I specify it as the destination folder once it has been created? Do I have to open the source folder on the compact flash card?
Thanks for the help, newbie trying to learn!

Just done it! Simple but effective. So then next problem! Automatically running the script when the compact flash card mounts on the desktop (Power Book with pc card adapter). Plus I need a error handler if the folder already exists!


set the date_stamp to ((the current date) as string)
set d to day of the (current date)
set m to month of the (current date)
set y to year of the (current date)

tell application "Finder"
	make new folder at desktop with properties {name:d & "_" & m & "_" & y as text}
	set destFlder to result
	select every item of folder "100NCD70" of folder "DCIM" of disk "NIKON_D70"
	move selection to destFlder
end tell


Any help would be appreciated!Thanks

What you can do is making something as a daemon(background) script which checks if your flashcard is connected or not.

like this:

on idle
tell application “Finder” --(or “System Events”)
–check if flashcard is connected
return 3 – checks every 3 seconds
end idle

Hi,
thanks for that will try it tonight.
I’ve sorted an error handlerso this bit will be great.
Steve