|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
script to copy user profile!!
i am migrating users from one domain to another and have decided to manually copy user local profiles to new domain. im using admt to migrate user accounts only to new domain nothing else..i have created a script pasted below. when i run this script it makes all relevent directories but dosn't copy any contents from user's directories. whats missing help!! thanks in advance. @Echo on C: Cd\ MD Profile CD Profile MD PST MD Favorites MD Desktop MD Docs MD Cookie Copy %userprofile%\desktop\*.* c:\profile\desktop\ Copy %userprofile%\Favorites\*.* c:\profile\Favorites\ Copy %userprofile%\local settings\application data\microsoft\outlook \*.pst c:\profile\pst\ Copy %userprofile%\cookies\*.* c:\profile\cookies\ You should always enclose file paths in double quotes, in case it contains
spaces: Copy "%userprofile%\desktop\*.*" "c:\profile\desktop\" Also, consider using XCopy: xcopy /? <snip> /S Copies directories and subdirectories except empty ones. /H Copies hidden and system files also. /K Copies attributes. Normal Xcopy will reset read-only attributes. <snip> /EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively. Show quote "mcp" <zafarhuss***@blueyonder.co.uk> wrote in message news:1177108255.074204.174950@q75g2000hsh.googlegroups.com... > hello everyone, > > i am migrating users from one domain to another and have decided to > manually copy user local profiles to new domain. im using admt to > migrate user accounts only to new domain nothing else..i have created > a script pasted below. when i run this script it makes all relevent > directories but dosn't copy any contents from user's directories. > whats missing help!! > > > thanks in advance. > > > @Echo on > C: > Cd\ > MD Profile > CD Profile > MD PST > MD Favorites > MD Desktop > MD Docs > MD Cookie > Copy %userprofile%\desktop\*.* c:\profile\desktop\ > Copy %userprofile%\Favorites\*.* c:\profile\Favorites\ > Copy %userprofile%\local settings\application data\microsoft\outlook > \*.pst c:\profile\pst\ > Copy %userprofile%\cookies\*.* c:\profile\cookies\ >
Show quote
On 21 Apr, 03:19, "Marty List" <use***@optimumx.com> wrote: hi thanks for you reply, but i have tried quotes and it still did not> You should always enclose file paths in double quotes, in case it contains > spaces: > Copy "%userprofile%\desktop\*.*" "c:\profile\desktop\" > > Also, consider using XCopy: > > xcopy /? > <snip> > /S Copies directories and subdirectories except empty ones. > /H Copies hidden and system files also. > /K Copies attributes. Normal Xcopy will reset read-only > attributes. > <snip> > /EXCLUDE:file1[+file2][+file3]... > Specifies a list of files containing strings. Each string > should be in a separate line in the files. When any of the > strings match any part of the absolute path of the file to be > copied, that file will be excluded from being copied. For > example, specifying a string like \obj\ or .obj will exclude > all files underneath the directory obj or all files with the > .obj extension respectively. > > "mcp" <zafarhuss***@blueyonder.co.uk> wrote in message > > news:1177108255.074204.174950@q75g2000hsh.googlegroups.com... > > > > > hello everyone, > > > i am migrating users from one domain to another and have decided to > > manually copy user local profiles to new domain. im using admt to > > migrate user accounts only to new domain nothing else..i have created > > a script pasted below. when i run this script it makes all relevent > > directories but dosn't copy any contents from user's directories. > > whats missing help!! > > > thanks in advance. > > > @Echo on > > C: > > Cd\ > > MD Profile > > CD Profile > > MD PST > > MD Favorites > > MD Desktop > > MD Docs > > MD Cookie > > Copy %userprofile%\desktop\*.* c:\profile\desktop\ > > Copy %userprofile%\Favorites\*.* c:\profile\Favorites\ > > Copy %userprofile%\local settings\application data\microsoft\outlook > > \*.pst c:\profile\pst\ > > Copy %userprofile%\cookies\*.* c:\profile\cookies\- Hide quoted text - > > - Show quoted text - work. please help.. thanks On 21 Apr, 17:44, mcp <zafarhuss***@blueyonder.co.uk> wrote:
Show quote > On 21 Apr, 03:19, "Marty List" <use***@optimumx.com> wrote: sorry my apology it works on Favourite, desktop, and .Pst, but not the> > > > > > > You should always enclose file paths in double quotes, in case it contains > > spaces: > > Copy "%userprofile%\desktop\*.*" "c:\profile\desktop\" > > > Also, consider using XCopy: > > > xcopy /? > > <snip> > > /S Copies directories and subdirectories except empty ones. > > /H Copies hidden and system files also. > > /K Copies attributes. Normal Xcopy will reset read-only > > attributes. > > <snip> > > /EXCLUDE:file1[+file2][+file3]... > > Specifies a list of files containing strings. Each string > > should be in a separate line in the files. When any of the > > strings match any part of the absolute path of the file to be > > copied, that file will be excluded from being copied. For > > example, specifying a string like \obj\ or .obj will exclude > > all files underneath the directory obj or all files with the > > .obj extension respectively. > > > "mcp" <zafarhuss***@blueyonder.co.uk> wrote in message > > >news:1177108255.074204.174950@q75g2000hsh.googlegroups.com... > > > > hello everyone, > > > > i am migrating users from one domain to another and have decided to > > > manually copy user local profiles to new domain. im using admt to > > > migrate user accounts only to new domain nothing else..i have created > > > a script pasted below. when i run this script it makes all relevent > > > directories but dosn't copy any contents from user's directories. > > > whats missing help!! > > > > thanks in advance. > > > > @Echo on > > > C: > > > Cd\ > > > MD Profile > > > CD Profile > > > MD PST > > > MD Favorites > > > MD Desktop > > > MD Docs > > > MD Cookie > > > Copy %userprofile%\desktop\*.* c:\profile\desktop\ > > > Copy %userprofile%\Favorites\*.* c:\profile\Favorites\ > > > Copy %userprofile%\local settings\application data\microsoft\outlook > > > \*.pst c:\profile\pst\ > > > Copy %userprofile%\cookies\*.* c:\profile\cookies\- Hide quoted text - > > > - Show quoted text - > > hi thanks for you reply, but i have tried quotes and it still did not > work. please help.. > > thanks- Hide quoted text - > > - Show quoted text - doc's and Cookies. Please help i have pasted the exact script.. @Echo on C: Cd\ MD Profile CD Profile MD PST MD Favorites MD Desktop MD Docs MD Cookie Copy "%userprofile%\desktop\*.*" "c:\profile\desktop\" Copy "%userprofile%\Favorites\*.*" "c:\profile\Favorites\" Copy "%userprofile%\local settings\application data\microsoft\outlook \*.pst" "c:\profile\pst\" copy "%userprofile%\My Documents\*.*" "c:\profile\Docs\" Copy "%userprofile%\cookies\*.*" "c:\profile\cookies\" Thanks "mcp" <zafarhuss***@blueyonder.co.uk> wrote in message Why don't you give more details? Say something more helpful than just it's news:1177175279.254939.223860@q75g2000hsh.googlegroups.com... > > sorry my apology it works on Favourite, desktop, and .Pst, but not the > doc's and Cookies. Please help i have pasted the exact script.. > not working. Are you saying the COPY command gives no errors, yet no files are copied? That would mean either there are no files in that folder, or they are hidden. Which operating systems do you need this script to work on?
Show quote
> sorry my apology it works on Favourite, desktop, and .Pst, but not the You MD Cookie (singular) but later copy to cookies (plural). Other than > doc's and Cookies. Please help i have pasted the exact script.. > > @Echo on > > C: > > Cd\ > > MD Profile > > CD Profile > > MD PST > > MD Favorites > > MD Desktop > > MD Docs > > MD Cookie that I don't see anything else syntactically wrong... Show quote > > Copy "%userprofile%\desktop\*.*" "c:\profile\desktop\" > > Copy "%userprofile%\Favorites\*.*" "c:\profile\Favorites\" > > Copy "%userprofile%\local settings\application data\microsoft\outlook > \*.pst" "c:\profile\pst\" > > copy "%userprofile%\My Documents\*.*" "c:\profile\Docs\" > > Copy "%userprofile%\cookies\*.*" "c:\profile\cookies\" -- Michael Harris Microsoft.MVP.Scripting |
|||||||||||||||||||||||