Comparing two files

Hi,

I recently started using the backup script provided by Apple. The script works great but I have a lot of files to back up and I only want to back up those files that are newer than the ones on the backup disk. I have pasted the script below but still need a way to compare the files in the backup drive to those I am trying to backup.

property backup_foldername : "Auto Backup"
property destination_foldername : "Mac Backup Folder"
property eject_when_done : false
property confirm_backup : true

on adding folder items to this_folder after receiving these_volumes
	tell application "Finder"
		activate
		try
			if not (exists folder backup_foldername of home) then
				error "This backup Folder Action script cannot continue " & "because the folder \"" & backup_foldername & "\" does not exist in the home directory."
			end if
			set the source_folder to folder backup_foldername of home
			-- get a list of alias files in the source folder
			set the alias_list to every alias file of the source_folder
			-- check to see if any of the alias files link to a disk
			repeat with i from 1 to number of items in alias_list
				set this_aliasfile to item i of alias_list
				try
					set this_item to the original item of this_aliasfile
					if the kind of this_item is "Volume" then
						set this_disk to (this_item as alias)
						if this_disk is in these_volumes then
							-- BACKUP THE FOLDER
							-- generate a list of items to backup
							set the backup_items to {}
							repeat with q from 1 to number of items in alias_list
								try
									set this_item to the original item of item q of alias_list
									if the kind of this_item is not "Volume" then
										set the end of the backup_items to this_item
									end if
								end try
							end repeat
							if the backup_items is {} then error "No items were found to backup."
							if not (exists folder destination_foldername of this_disk) then
								make new folder at this_disk with properties {name:destination_foldername}
							end if
							if confirm_backup is true then
								display dialog "Backup folder \"" & backup_foldername & "\"?" giving up after 30
								if the button returned of the result is "" then error number -128
							end if
						    with timeout of 3600 seconds
								duplicate the backup_items to folder destination_foldername of this_disk with replacing
							end timeout
							if eject_when_done is true then
								eject this_disk
							end if
							exit repeat
						end if
					end if
				end try
			end repeat
		on error error_message number error_number
			if the error_number is not -128 then
				display dialog error_message buttons {"OK"} default button 1
			end if
		end try
	end tell
end adding folder items to

Model: Powerbook G4
Browser: Safari 412.2.2
Operating System: Mac OS X (10.4)

It wouldn’t be trivial. See the line with the duplicate command? It’s duplicating whole folder/file structures in one command. It’s not traversing directory trees or copying individual files, so there’s no place to just stick in a date modified test.

I just use Retrospect, so I don’t know of a script that does what you want, but I’ll bet someone else will.