How do I change users?

Im creating a batch file, for multiple computers, but how do i change it for different users?

  • Hard to explain. What i mean is, im creating a batch file that will create a txt file from it. However im not the only PC that will be using it. atm the directory is c:\Users\Hellouser\My Received Files Help pls? is there anyway i can change it so the 'hellouser' changes for what ever the users directory is. I have seen this, but not sure if it would work. c:\Users\%username%\My Received Files

  • Answer:

    "c:\Users\%username%\My Received Files" should work. You can also use "%Userprofile%\My Received Files", which is prefered, as it will keep working even if the User Profile folders are relocated. Open a command prompt and type Set user, that will list the user variables, do that on each account to see the difference.

kyle at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Yep that'll work. Have a google on environment variables for more info Have fun

Hal 9000

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.