Re: Backing up only new files
Re: Backing up only new files
- Subject: Re: Backing up only new files
- From: Joseph Weaks <email@hidden>
- Date: Mon, 26 Apr 2004 17:55:25 -0500
set up the recursion depending on the structure of your file system.
Primarily, decide how many folders deep do you want to check for
modified files before you simply copy the whole folder. It will be a
big time saver. Once you have the recursion set up in a repeat loop,
here's the Finder terminology, assuming originalItem and backupItem are
references to the corresponding files.
tell application "Finder"
if ((modification date of item backupItem) < (modification date of
item originalItem)) then
-- originalItem is newer
else
--backupItem presumably has same modification date (or is newer, which
would be wierd)
end if
end tell
Cheers,
Joe
On Apr 26, 2004, at 2:32 PM, Bernard Azancot wrote:
Hello scripters !
I am very proud of my little simple backup script. ;-))
I use it everyday, at work without trouble, but... now , after months
of use, I would like to improve it.
Could it be possible to backup ONLY what has been modified or created,
not replacing the entire volume ?
How does AS compare files, and decide they are the same (not just the
same name) ?
I am wondering how I could do it.
I was thinking of comparing the 2 folders items lists.
It could go like this:
---
set Folder1Contents to list folder BUSource without invisibles
set Folder2Contents to list folder BUDestination without invisibles
repeat with x in Folder1Contents
---
Could it be the right way to seek ?
Thanks in advance or the advices.
Apologies for basic question and poor english.
Bernard
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.