AppleScript to map network drive with username in path

Discussion in 'Mac Programming' started by Vash108, Nov 12, 2015.

  1. Vash108 macrumors member

    Vash108

    Joined:
    Nov 12, 2015
    #1
    Hey all, I am attempting to make a script that will map users folders on our network.
    I wanted to know if there is a way to pull the user name of who is logged in and add it to the path of the folder I am attempting to map.

    For example: mount volume "smb://<server name>/users/<user name>"

    I know I can use the following lines to pull the current user. But how would I apply that information to the volume mount path I am attempting?
    Tell application "System Events"
    name of current user
    end tell

    I am still a bit new to this.
     
  2. Vash108 thread starter macrumors member

    Vash108

    Joined:
    Nov 12, 2015
    #3

Share This Page