Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Automator - variable in get servers

I am trying to create and Automator workflow that mounts a users home folder when they run it. I can use the "Get Specified Servers" with the folder coded in but I need a workflow that will work for multiple users.


Here is what I am trying but can't get it to work:


1 - Ask for Text (The user puts the name of the remote folder here (it matches their username))

2 - Set Value of Variable - username

3 - Get Specified Servers (I need the varible passed to one of the urls here)


The users home folders are hidden folders on a Windows network share so it has to end with $


Thanks,


Zach

Posted on Aug 28, 2013 9:20 AM

Reply
Question marked as Best reply

Posted on Aug 28, 2013 10:08 AM

I am trying to create and Automator workflow that mounts a users home folder when they run it.


By definition, a user's home folder will be mounted when the user logs in. Therefore you can't mean their home folder. You may have some other user-specific folder that you want to mount post-login, but don't confuse that with a home directory.


1 - Ask for Text (The user puts the name of the remote folder here (it matches their username))


If the name of the folder always matches their username, don't bother asking them for it. Not only is it prone to errors (typos, etc.), delays (waiting for the user to type), but it's also unnecessary. Just use the 'short user name' variable instead.


3 - Get Specified Servers (I need the varible passed to one of the urls here)


The Get Specified Servers action won't normally accept variable inputs in the server URL (bad UI design on Apple's part), but you can work around it by substituting the variable's UID. That is a little tacky, IMHO, so your other option is to mount the share via some other way that does accept variable inputs (e.g. a shell script or some such).

1 reply
Question marked as Best reply

Aug 28, 2013 10:08 AM in response to BiggZach

I am trying to create and Automator workflow that mounts a users home folder when they run it.


By definition, a user's home folder will be mounted when the user logs in. Therefore you can't mean their home folder. You may have some other user-specific folder that you want to mount post-login, but don't confuse that with a home directory.


1 - Ask for Text (The user puts the name of the remote folder here (it matches their username))


If the name of the folder always matches their username, don't bother asking them for it. Not only is it prone to errors (typos, etc.), delays (waiting for the user to type), but it's also unnecessary. Just use the 'short user name' variable instead.


3 - Get Specified Servers (I need the varible passed to one of the urls here)


The Get Specified Servers action won't normally accept variable inputs in the server URL (bad UI design on Apple's part), but you can work around it by substituting the variable's UID. That is a little tacky, IMHO, so your other option is to mount the share via some other way that does accept variable inputs (e.g. a shell script or some such).

Automator - variable in get servers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.