• 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: Another 'Mail' hassle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another 'Mail' hassle


  • Subject: Re: Another 'Mail' hassle
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 26 Apr 2017 11:14:32 +1000

G’day again.

After an offline email from Yvan, suggesting the error looked like it was from the Finder, I decided to further play around.

Adding ‘Volume:” to the folder name was rejected, but using alias was accepted BUT DOES NOTHING! No import!

Any suggestions, please?

Regards

Santa

property cccDisk : ""
set theStart to true
try
set p to 1
tell application "Finder"
activate
set my cccDisk to "Daily Backup"
set theExternalDisk to disk (my cccDisk)
set folderNames to name of (folders of (folder "Users" of theExternalDisk))
repeat with eachname in folderNames
if eachname is not in {"Guest", "Shared"} then
set theExternalUser to folder eachname of (folder "Users" of theExternalDisk)
exit repeat
end if
end repeat
set theMailStorage to every folder of folder "V4" of folder "Mail" of folder "Library" of theExternalUser
set repeatExit to true
repeat with eachCheckFolder in theMailStorage
set p to 2
set eachCycleFolder to every folder of eachCheckFolder
repeat with eachFolder in eachCycleFolder
set p to 3
if (name of eachFolder as text) starts with "Year" and name extension of eachFolder is "mbox" then
set p to 4
set eachFolder to eachFolder as alias
set p to 5
tell application "System Events" to display dialog (eachFolder as text) giving up after 2
set p to 7
my importMail(eachFolder)
end if
end repeat
end repeat
end tell
on error errmsg
tell application "System Events" to display dialog errmsg & " p = " & p giving up after 20
end try

on importMail(eachFolder)
tell application "Mail"
activate
try
say "importing"
import Mail mailbox at eachFolder
on error errmsg
tell application "System Events" to display dialog "Import " & errmsg giving up after 20
end try
end tell
end importMail

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Another 'Mail' hassle
      • From: Brian Christmas <email@hidden>
References: 
 >Another 'Mail' hassle (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: TextEdit things
  • Next by Date: Speeding up OmniFocus/Calendar Script
  • Previous by thread: Another 'Mail' hassle
  • Next by thread: Re: Another 'Mail' hassle
  • Index(es):
    • Date
    • Thread