Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: script to copy user profile!!

HTVi
TV Discussion Newsgroups

script to copy user profile!!
mcp <zafarhussain[ at ]blueyonder.co.uk> 4/20/2007 10:30:55 PM
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\

Re: script to copy user profile!!
"Marty List" <usenet[ at ]optimumx.com> 4/21/2007 2:19:36 AM

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\
>

Re: script to copy user profile!!
mcp <zafarhussain[ at ]blueyonder.co.uk> 4/21/2007 4:44:00 PM
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

Re: script to copy user profile!!
mcp <zafarhussain[ at ]blueyonder.co.uk> 4/21/2007 5:07:59 PM
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

Re: script to copy user profile!!
"Marty List" <usenet[ at ]optimumx.com> 4/22/2007 2:18:49 AM


"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?


Re: script to copy user profile!!
"Michael Harris \(MVP\)" <mikhar.at.mvps.dot.org> 4/22/2007 2:41:43 AM
[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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen