PC Review


Reply
Thread Tools Rate Thread

Moving folders around

 
 
Hank Eisenstein Google
Guest
Posts: n/a
 
      30th Jun 2003
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
 
Reply With Quote
 
 
 
 
Dmitry Korolyov
Guest
Posts: n/a
 
      30th Jun 2003
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
>



 
Reply With Quote
 
Hank Eisenstein
Guest
Posts: n/a
 
      1st Jul 2003
I've never been good a scripts or batch files. Something we tried was

for /f %d in ("user profiles") do for /d %i IN (\\newsvr\%d$\*) DO subinacl
/subdirectories \\newsvr\%d$\%i\*.* /setowner=domname\%i && xcacls
\\newsvr\%d$\%i\*.* /t /g domname\%i:f

which didn't work very well at all. I'm unclear on exactly what it's doing,
because when we ran it on a test group, it wasn't pretty.
-Hank

"Dmitry Korolyov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> >

>
>



 
Reply With Quote
 
Mo
Guest
Posts: n/a
 
      4th Jul 2003
I have always found EXCEL very good at producing one off batch files to do
tasks like the one you want, You can usually export a list of users then
create an EXCEL formula to make the command line you. Copy the formula down
the column and cut and paste into a text file which you can rename to a .CMD
or .BAT file - test on a limited group first.

"Hank Eisenstein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've never been good a scripts or batch files. Something we tried was
>
> for /f %d in ("user profiles") do for /d %i IN (\\newsvr\%d$\*) DO

subinacl
> /subdirectories \\newsvr\%d$\%i\*.* /setowner=domname\%i && xcacls
> \\newsvr\%d$\%i\*.* /t /g domname\%i:f
>
> which didn't work very well at all. I'm unclear on exactly what it's

doing,
> because when we ran it on a test group, it wasn't pretty.
> -Hank
>
> "Dmitry Korolyov" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: vista leaves behind folders when moving folders with files in them John Windows Vista General Discussion 0 14th Nov 2008 07:07 PM
Free Moving Estimate, Local Movers, Long Distance Moving, PackingSupplies, Storage Rental, Home Moving, Apartment Moving, Office Moving,Commercial Moving linkswanted Microsoft ASP .NET 0 6th Jan 2008 05:45 AM
Moving User Folders Corrupts Desktop, Favorites, Contacts and Documents Folders fletch Windows Vista General Discussion 0 3rd Nov 2007 03:57 PM
Auto-expand nested/sub-folders not working in Outlook 2003 when copying/moving messages to folders? =?Utf-8?B?SmFzb24=?= Microsoft Outlook 0 27th Feb 2004 01:36 PM
Moving data from personal folders to exchange folders dseltz Microsoft Outlook 0 17th Jul 2003 01:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:38 AM.