Hi!
I’ve run into a little weirdness while trying to write a little AppleScript to automatically backup my home directory every night, and I’d really appreciate a little help.
When I try to copy the “Library” folder (from inside my Users/username folder) to an external drive, up pops a Finder dialog asking me for my username and password. (The same thing happens if I manually drag the “Library” folder to the external drive.)
I’m surprised to see this, cuz it’s my library folder and I’m not trying to do anything that unusual with it (just copy it).
More to the point, though, could you please let me know the syntax for specifying the password and username for the Finder’s “duplicate” command? (or some other way to authenticate?)
Thanks for your help!
- Sean Rome
srome@cinci.rr.com
tell application "Finder"
set hostFolder to folder "AppleScripted Lando bpus" of disk "DS160" -- where to put the created serialized bpu folders
set userToBackup to folder "lando" of folder "Users" of disk "Lando" -- which user folder to backup
set newFolderName to "new backup folder"
set newFolder to make folder at hostFolder with properties {name:newFolderName}
-- below is the line that causes the password dialog to pop up
duplicate folder "Library" of userToBackup to newFolder replacing conflicts
end tell