+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
Mac Thread, Mount specific folder on desktop in Technical; Originally Posted by theeldergeek Going to be working on this tomorrow, will post how I get on. Did you get ...
  1. #16


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,776
    Thank Post
    223
    Thanked 2,632 Times in 1,939 Posts
    Rep Power
    779
    Quote Originally Posted by theeldergeek View Post
    Going to be working on this tomorrow, will post how I get on.
    Did you get it working?

  2. #17


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,776
    Thank Post
    223
    Thanked 2,632 Times in 1,939 Posts
    Rep Power
    779
    Quote Originally Posted by sted View Post
    though it does seem to add every time you run it filling up desktop with folders
    This AppleScript may help with that (although you will need to modify it a bit first).

    Code:
    -- Define variables
    
    -- STRING LIST, all network shares to work with
    set disk_list to {"share1", "share2", "share3"}
    -- STRING, prefix to the network shares (for NFS only)
    set disk_prefix to "/usr/local/symlinks/nfs"
    -- STRING, server hostname (use IP if not using SMB)
    set server to "192.168.0.17"
    -- STRING, protocol, e.g. "smb://" or "ftp://"
    set protocol to "smb://"
    
    -- Mount Volumes
    
    tell application "Finder"
      -- get every non-local disk
      set all_disks to every disk whose local volume is false
      -- set variable for mounting
      set already_mounted to false
      
      -- go through all found disks ...
      repeat with current_disk in all_disks
        try
          -- ... and check, if names match with defined shares
          if name of current_disk is in disk_list then
            eject current_disk
            -- as we found at least one mounted share, no need to remount (all)
            set already_mounted to true
          end if
        end try
      end repeat
      
      -- check if in the preceding action any drive was unmounted
      if already_mounted is false then
        -- go through disk list and mount every 'volume' from 'server' with 'protocol'
        repeat with volume in disk_list
          try
            -- build string for mount path to server share
            set mount_path to protocol & server & disk_prefix & "/" & volume
            mount volume mount_path
          end try
        end repeat
      end if
      
    end tell

  3. #18
    theeldergeek
    Guest
    Quote Originally Posted by Arthur View Post
    Did you get it working?
    No, sorry, been tied up with other stuff at the moment. Not sure when I am going to be able to work on this now; unlikely to be this week.

  4. #19
    theeldergeek
    Guest
    Quote Originally Posted by Arthur View Post
    This AppleScript may help.....
    Yee Gads! You've gone way out of my comfort zone now. I need to know how to undo what I've done before I start running scripts.


  5. #20

    Join Date
    Jun 2010
    Location
    Sheffield
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I'm using a Symbolic link created in my log on hook (ln -s Target NameOfLink)
    That way it gets created for each user using the $1 variable (username) from the logon hook, and it gets created at every login and gets replaced at each login if the user deletes it.

  6. #21
    theeldergeek
    Guest
    Quote Originally Posted by eddyh7 View Post
    I'm using a Symbolic link created in my log on hook (ln -s Target NameOfLink)
    That way it gets created for each user using the $1 variable (username) from the logon hook, and it gets created at every login and gets replaced at each login if the user deletes it.
    Waaaaay over my head at the moment; I clearly have some learning to do
    Thanks anyway.


  7. #22
    theeldergeek
    Guest
    Quote Originally Posted by Arthur View Post
    Did you get it working?
    The moment has passed. I just set up a few accounts and got each user to log in and use a specific folder via Finder rather than force mount on the dock or desktop. I would still like to get this working although it will have to go on the back burner for a while. Might be a Summer Hols 'project' now.

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Desktop folder redirection in 10.5?
    By iSteve in forum Mac
    Replies: 6
    Last Post: 16th February 2010, 03:36 PM
  2. Folder Redirection and Public Desktop
    By Willott in forum Windows
    Replies: 10
    Last Post: 16th July 2009, 11:20 AM
  3. Replies: 3
    Last Post: 16th February 2009, 09:36 PM
  4. Desktop PC Mount ??
    By pooley in forum Hardware
    Replies: 2
    Last Post: 12th September 2008, 11:31 AM
  5. Folder redirection no desktop??
    By mullet_man in forum Wireless Networks
    Replies: 4
    Last Post: 6th December 2005, 10:34 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •