|
|
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.
[ at ]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.
"mcp" <zafarhussain[ at ]blueyonder.co.uk> wrote in message news:1177108255.074204.174950[ at ]q75g2000hsh.googlegroups.com...
[Quoted Text] > 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. > > > [ at ]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\ >
|
|
On 21 Apr, 03:19, "Marty List" <use...[ at ]optimumx.com> wrote:
[Quoted Text] > 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...[ at ]blueyonder.co.uk> wrote in message > > news:1177108255.074204.174950[ at ]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. > > > [ at ]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
|
|
On 21 Apr, 17:44, mcp <zafarhuss...[ at ]blueyonder.co.uk> wrote:
[Quoted Text] > On 21 Apr, 03:19, "Marty List" <use...[ at ]optimumx.com> wrote: > > > > > > > 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...[ at ]blueyonder.co.uk> wrote in message > > >news:1177108255.074204.174950[ at ]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. > > > > [ at ]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 -
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..
[ at ]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" <zafarhussain[ at ]blueyonder.co.uk> wrote in message news:1177175279.254939.223860[ at ]q75g2000hsh.googlegroups.com...
[Quoted Text] > > 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.. >
Why don't you give more details? Say something more helpful than just it's 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?
|
|
|
[Quoted Text] > 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.. > > [ at ]Echo on > > C: > > Cd\ > > MD Profile > > CD Profile > > MD PST > > MD Favorites > > MD Desktop > > MD Docs > > MD Cookie
You MD Cookie (singular) but later copy to cookies (plural). Other than that I don't see anything else syntactically wrong...
> > 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
|
|
|