Share via

RoboCopy, get user credentials

Anonymous
2016-12-29T17:29:19+00:00

I hope I am in the right place.

Creating a script to copy a users email signatures at log off so they have a copy.

ROBOCOPY "C:\Users%name.domain%\AppData\Roaming\Microsoft\Signatures" "\filesrv1\Employee Folders%username%\My OutLook\Signatures" *.*

I have it working when both %name .domain% and %username% are not variables.

My scripting is limited and I am trying to see if by setting those variables would work.  I do not know how to lookup what the variables are so that they can be set.

Trying to avoid the need of a script for each person.

Thanks in advance.

Windows for home | Previous Windows versions | Apps

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2017-01-09T16:27:15+00:00

    Thank you much.

    I did finally find the environment variables and got the script running.  I see your using %appdata%.  That solved the issue I'm seeing where some users are username.domain and some are not.  Beats having two versions of the same script.

    Thanks Again

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-12-29T19:15:28+00:00

    Here you go:

    ROBOCOPY /w:1 /r:1 "%AppData%\Microsoft\Signatures" "\filesrv1\Employee Folders%username%\My OutLook\Signatures"

    Was this answer helpful?

    0 comments No comments