% wildcard use example

By XnavyDK ·
I see this all over , Granted I am still learning and this may seem simple to you guys so dont laugh. I am trying to make user profiles and redirecting folders in those profiles to a local drive so the "profile" wont be so large. What the heck does the % mean before and after the string? //server/share/%username%. I know its a wild card but its meaning eludes me.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

You can use either

by Dumphrey In reply to so when i...

net use H: "\\\Home Folders\%username%\" /persistent:yes

Would map the users home folder from a server to the H drive on their machine, and keep it through reboots.

you can replace %username% with any user name and it will work if the user running the script as permissions to access the share.

another example

cd %homepath%

is the same as
cd c:\Documents and Settings\UserA
cd c:\Documents and Settings\%username%

a decent list of them online:

Collapse -

/persistent : yes

by XnavyDK In reply to You can use either

does this mean that it will be available after logoff?

Thanks a lot, I have learned too much today, I have a headache.. LOL

Collapse -

Yes and no

by IC-IT In reply to /persistent : yes

It will still be available for that user when they logon again. It will not be there for another user.
In this case persistent means that if you ran the script just once, the drive mapping should remain until removed.
Persistent: no would remove the mapping on a restart (unless the script is still there, then it would map it for 1 more use).

Related Discussions

Related Forums