Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: An AppleScript to automate Address Book backups' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: An AppleScript to automate Address Book backups
Authored by: mark hunte on Dec 02, '05 06:30:56PM
do shell script "date +%m-%d-%y" -- Gets the Date
set todaysDate to result
set dated_folder to "ABBackup_" & todaysDate -- Sets variable for Making dated folder
tell application "Finder"
	set backup_Folder to "ABBackup"
	set Sup_path_folder to path to application support from user domain as string
	set addbookFolder to folder "AddressBook" of folder Sup_path_folder as string
	set doc_path_folder to path to documents folder from user domain as string
	if not (exists folder backup_Folder of folder doc_path_folder) then
		make new folder at doc_path_folder with properties {name:backup_Folder}
	end if
	set backup_Folder to folder backup_Folder of folder doc_path_folder as string
	if not (exists folder dated_folder of folder backup_Folder) then
		make new folder at backup_Folder with properties {name:dated_folder}
	end if
	tell application "Finder"
		duplicate items of folder addbookFolder to folder dated_folder of folder backup_Folder with replacing
	end tell
end tell
<p>---<br>mh</code></pre>


[ Reply to This | # ]