Announcement

Collapse
No announcement yet.

Home Directory Variable I Can Use?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Home Directory Variable I Can Use?

    Is there a variable for a user's home directory? Under user properties > Profile > Home Directory.

    I'm trying to make a custom tool that will allow me to copy a user's home directory to a temp folder. Here's what I have so far:

    cmd /c c:\tools\robocopy.exe "\\server1\%variable for home dir?%" "\\server2\temp\homedirectories\%variable for home dire?%"

  • #2
    Re: Home Directory Variable I Can Use?

    Are your user home directories created with the username, or some other structure?

    Comment


    • #3
      Re: Home Directory Variable I Can Use?

      Thats the problem Some are created with the old user name before AD migration. Now the ones after AD migration are with the new user name. Used to be BobS now its Bob.Smith; so it could be either one =/

      Now for the ones that are first.last its really easy; I already have a tool taht does it. I can simply use %E%. However the older accounts dont match up username to homedirectory name.

      Comment


      • #4
        Re: Home Directory Variable I Can Use?

        We would have no way parsing out just that part of the home directory.

        One thought, though, would be to simply export out the users and their home directories to a file. Open that file with Excel and delete the columns you don't need. Then simply do a search and replace of the \\server1\ part of the current home directories, and replace with the new location.

        Add a column at the beginning with c:\tools\robocopy.exe in it and save it as a batch file. Run the batch file and you should be set.

        Comment


        • #5
          Re: Home Directory Variable I Can Use?

          Good idea; I'll try something like that.

          Thank you for your support.

          Comment

          Working...
          X