Announcement

Collapse
No announcement yet.

Another user moving question

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

  • Guest's Avatar
    Guest replied
    Re: Another user moving question

    You might be able to use %8 for this, but you would have to test it.

    The best approach to using these post-user batch files is to put in echo statements for each of the variables such as:

    echo %1
    echo %2
    pause

    Then actually run a delete of a test user and see what each of variables actually translates to for you. Then you can pick and choose the ones that work for each task that you need it to perform.

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Another user moving question

    Another user moving question

    I just was posting in the Testimonials about a repetitive task that I have to do, and I had a thought that maybe someone here could help me refine. As I said, I'm not too hot on Templates yet, so I want to see if I understand this before I try it.

    I have to delete a bunch of disabled accounts. But before I delete them, I have to save their home folders to a storage drive. Could I set up a template called "deleted accounts" that uses the path of \\storagedrive\thismonthsfolder\username and just apply that template to each account that I have to delete, and then use the scopy utility to move all of the user's files from their home directory on their old home server to the new directory on the storage server?

    It sounds like that should work. But I guess I have some questions about the details. First, when I create the SCOPY command, is there a parameter that will specify the OLD server? If I have a user with a home directory at \\servername\home\user123, and I want to move him to \\storage\thismonth\user123, then I have to do <span style="font-weight: bold">SCOPY \\servername\home\user123 \\storage\thismonth\user123 /s</span>. How do I get that first parameter of the old server name in there? Would I have to have a different template for every server and make the command be <span style="font-weight: bold">SCOPY \\server1\home\%2 \\storage\thismonth\%2 /s</span> for every serverX?

    Secondly, I'm assuming that I'd actually have to do this in some sort of batch file if I wanted to have it delete the files from the old server?
Working...
X