• 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: Mount volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mount volume


  • Subject: Re: Mount volume
  • From: Eric Taylor <email@hidden>
  • Date: Wed, 18 Feb 2009 10:45:52 -0700

Whoops, just realized I called the same server 5 times in my first try. Possibly something more like this...

set serverList to {"alice", "bob", "charlie", "don", "ellen"}
set userPassList to {"alice:pass", "bob:pass", "charlie:pass", "don:pass", "ellen:pass"}
set cmdResult to ""

repeat with i from 1 to 5
set theCmd to "mkdir /Volumes/Data" & i
log theCmd
set cmdResult to do shell script theCmd
if cmdResult ≠ "" then
display dialog "There appears to have been an error. mkdir says:" & return & return & cmdResult buttons "Cancel" default button 1
end if
set theCmd to "mount_afp afp://" & item i of userPassList & "@" & item i of serverList & ".local/Data /Volumes/Data" & i
log theCmd
set cmdResult to do shell script theCmd
--Not sure how to error check this one. It always returns some gibberish...
end repeat

Results will look like:
(*mkdir /Volumes/Data1*)
(*mount_afp afp://alice:email@hidden/Data /Volumes/Data1*)
(*mkdir /Volumes/Data2*)
(*mount_afp afp://bob:email@hidden/Data /Volumes/Data2*)
(*mkdir /Volumes/Data3*)
(*mount_afp afp://charlie:email@hidden/Data /Volumes/Data3*)
(*mkdir /Volumes/Data4*)
(*mount_afp afp://don:email@hidden/Data /Volumes/Data4*)
(*mkdir /Volumes/Data5*)
(*mount_afp afp://ellen:email@hidden/Data /Volumes/Data5*)

 _______________________________________________
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: Mount volume
      • From: Doug McNutt <email@hidden>
References: 
 >RE: Mount volume (From: "Script2" <email@hidden>)

  • Prev by Date: Re: Apps vs. Scripts - and of time we don't have
  • Next by Date: Re: Apps vs. Scripts - and of time we don't have
  • Previous by thread: RE: Mount volume
  • Next by thread: Re: Mount volume
  • Index(es):
    • Date
    • Thread