Re: script to copy user profile!!




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@xxxxxxxxxxxxxxxx> wrote in message news:1177108255.074204.174950@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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\


.



Relevant Pages

  • Re: How does one move everthing from one drive to another?
    ... You could try using xcopy with all the appropriate switches, but frankly, I ... destination Specifies the location and/or name of new files. ... Specifies a list of files containing strings. ...
    (microsoft.public.windowsxp.basics)
  • Re: script to copy user profile!!
    ... Specifies a list of files containing strings. ... MD Profile ...
    (microsoft.public.windows.server.scripting)
  • Re: script to copy user profile!!
    ... Also, consider using XCopy: ... Specifies a list of files containing strings. ...
    (microsoft.public.windows.server.scripting)
  • Re: Sophisticated(!) copying in DOS
    ... Specifies a list of files containing strings. ... 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. ... exclude file. ... In the xcopy command, ...
    (microsoft.public.windowsxp.general)
  • Re: Building a function call?
    ... for func in allfunctions: ... unsafe practices can usually be avoided by ... remembering that functions are first class objects just like ints, strings ...
    (comp.lang.python)