• 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: AFP,SMB share mounting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AFP,SMB share mounting


  • Subject: Re: AFP,SMB share mounting
  • From: Rich Baker <email@hidden>
  • Date: Fri, 22 Feb 2002 18:23:42 -0500

Well, the quick answer to mounting an SMB volume via AppleScript is to send a command-line command, ala:

do shell script "mkdir foo; mount_smbfs -N //USER@SERVER/SHARE ./foo;"

Of course, the "do shell script" command always starts at the root directory, so you may need to expand your paths.

The quick answer for mounting an AFP share through the command line would be to execute an applescript, ala:

osascript -e 'mount volume "afp://server1/" as user "joe" with password "toe"'

The -e switch tells osascript to run the quoted command. You could also leave out the -e and instead insert a reference to an actual AppleScript file. Just check out the man page for osascript, I'm sure you'll feel right at home.

Rich Baker
email@hidden

On Friday, February 22, 2002, at 05:11 PM, Rob Barris wrote:

I know how to mount an AFP share from an AppleScript:

mount volume "afp://server1/" as user "joe" with password "toe"

I know how to mount an SMB share at the command line

(after setting up a .nsmbrc file in ~user...)
mkdir foo
mount_smbfs -N //USER@SERVER/SHARE ./foo


I don't know how to mount an SMB share from AppleScript.
I don't know how to mount an AFP share from the command line!

Any guesses on the last two?

Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >AFP,SMB share mounting (From: Rob Barris <email@hidden>)

  • Prev by Date: Re: Performance when Checking if File Exists - wrong list
  • Next by Date: Re: Newbies Question...
  • Previous by thread: AFP,SMB share mounting
  • Next by thread: Re: AFP,SMB share mounting
  • Index(es):
    • Date
    • Thread