The script below creates a new folder with the current date and time as the folder name. In this same script how can I duplicate files into the new folder?The folder name will be unique every time the script is run so I can’t just type a path to the folder. Thanks.
set the_backup_source to alias "Powerbook:Users:dou:Documents:script tutorial:daily intake:"
set the_backup_destination to alias "Powerbook:Users:dou:Desktop:auto backup:"
set the_date to current date
set the_time to time of (current date)
set folder_name_prefix to the date string of the_date
set folder_name_suffix to the_time
tell application "Finder"
make new folder at the_backup_destination with properties ¬
{name:folder_name_prefix & "_" & folder_name_suffix}
duplicate every item of the_backup_source to the_backup_destination with replacing
set label index of the_backup_destination to 6
end tell
set dp to (path to desktop as string)
set s to (dp & “f1:”) as alias
set bd to (dp & “f2:”) as alias
set d to (current date)
set t to time of d
set p to the date string of d
set the_name to (p & “_” & t)
tell application “Finder”
set r to (make new folder at bd with properties {name:the_name})
duplicate every item of s to r with replacing
end tell