Do you know about a shell built-in "for" command?
If you do, you should be able to perform the task. First, obtain a list of
usernames in a text file (dir /b >userlist.txt is a possibility). Then, use
that text file as list source for the "for" command and perform the commands
you need to transfer data in one big batch.
--
Dmitry Korolyov
(E-Mail Removed)
To e-mail me, remove "nospamformorons"
from the address.
"Hank Eisenstein Google" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> We are getting ready to migrate from an NT4 domain to an AD domain,
> and part of that process requires that I move user shares around. I
> have two directories, \svr\user$, and \svr\profile$. I need to move
> these folders and all their contents to \newsvr\user$ and
> newsvr\profile$. I took ownership, granted myself full control over
> all the files, and copied them, using these commands:
>
> subinacl /subdirectories \\svr\user$\*.* /setowner="domname\domain
> admins"
>
> xcacls \\svr\user$\*.* /t /e /g "domname\domain admins":f
>
> xcopy \\svr\user$\*.* \\newsvr\user$\*.* /e/h/k/o/i
>
> Now the problem I have is reassigning the appropriate ownership and
> permissions to each user folder. I also need to assign the
> permissions to the %username% folder. Doing them one at a time, I've
> needed to do this:
>
> subinacl /subdirectories \\newsvr\user$\[username]
> /setowner="domname\[username]"
>
> subinacl /subdirectories \\newsvr\user$\[username]\*.*
> /setowner="domname\[username]"
>
> As you can imagine, this is incredibly tedious. Is there a way to do
> this automatically for all users in a certain directory?
>
> Thanks for your assistance.
> -Hank
>