• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Backing up only new files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Backing up only new files (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Finder Window toolbar toggling
  • Next by Date: Re: Finder Window toolbar toggling
  • Previous by thread: Re: Backing up only new files
  • Next by thread: Re: Backing up only new files
  • Index(es):
    • Date
    • Thread