Here’s a more realistic version of Archive script from the movie. It updates the path to:
- Exclude @done tasks that are already in the archive.
- Exclude @done tasks that are descendants of other done tasks.
tell front document of application "Bike"
set thePath to "//task @done except (/Archive//* union //task//*)"
set theArchive to row named "Archive"
set theRows to query outline path thePath
repeat with each in theRows
move each to theArchive
end repeat
end tell