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?
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?
Comment