Home All Groups Group Topic Archive Search About
Author
6 Apr 2005 9:47 AM
James
I want to create a batch file that copies files from one server to the other
& should kind of do the following;

Ask me for the server name & then I input it.
Ask me for the username & then I input it

Then this copies the files to the other server so it will;

Ask me the server name to & then I input it.
Ask me for the username & I input it

I have tried finding a newsgroup for DOS but I can't find it.
If you can help thanks in advance

James

Author
6 Apr 2005 11:41 AM
Pegasus (MVP)
Show quote Hide quote
"James" <Ja***@discussions.microsoft.com> wrote in message
news:2A5F20F5-EBB7-41AD-90BC-ED461D73AEA5@microsoft.com...
> I want to create a batch file that copies files from one server to the
other
> & should kind of do the following;
>
> Ask me for the server name & then I input it.
> Ask me for the username & then I input it
>
> Then this copies the files to the other server so it will;
>
> Ask me the server name to & then I input it.
> Ask me for the username & I input it
>
> I have tried finding a newsgroup for DOS but I can't find it.
> If you can help thanks in advance
>
> James

Here is the general idea:

@echo off
set /p server1=Please enter the name of the source server:
xcopy /s /y /d /c \\%server1%\SomeShare\SomeFolder\*.*  \\%Server2%\etc.
Author
6 Apr 2005 1:29 PM
James
Pegasus & David H. Lipman - Thankyou

Show quoteHide quote
"Pegasus (MVP)" wrote:

>
> "James" <Ja***@discussions.microsoft.com> wrote in message
> news:2A5F20F5-EBB7-41AD-90BC-ED461D73AEA5@microsoft.com...
> > I want to create a batch file that copies files from one server to the
> other
> > & should kind of do the following;
> >
> > Ask me for the server name & then I input it.
> > Ask me for the username & then I input it
> >
> > Then this copies the files to the other server so it will;
> >
> > Ask me the server name to & then I input it.
> > Ask me for the username & I input it
> >
> > I have tried finding a newsgroup for DOS but I can't find it.
> > If you can help thanks in advance
> >
> > James
>
> Here is the general idea:
>
> @echo off
> set /p server1=Please enter the name of the source server:
> xcopy /s /y /d /c \\%server1%\SomeShare\SomeFolder\*.*  \\%Server2%\etc.
>
>
>
>
Author
7 Apr 2005 7:55 AM
James
Hi - the code is working fine however I have encountered a problem.  I have
alot of servers & I (if possible) would like to be able to select server 1 as
the source but in another instance select say server 63 in another instance &
not have to change the batch file.  Is that possible?

Show quoteHide quote
"Pegasus (MVP)" wrote:

>
> "James" <Ja***@discussions.microsoft.com> wrote in message
> news:2A5F20F5-EBB7-41AD-90BC-ED461D73AEA5@microsoft.com...
> > I want to create a batch file that copies files from one server to the
> other
> > & should kind of do the following;
> >
> > Ask me for the server name & then I input it.
> > Ask me for the username & then I input it
> >
> > Then this copies the files to the other server so it will;
> >
> > Ask me the server name to & then I input it.
> > Ask me for the username & I input it
> >
> > I have tried finding a newsgroup for DOS but I can't find it.
> > If you can help thanks in advance
> >
> > James
>
> Here is the general idea:
>
> @echo off
> set /p server1=Please enter the name of the source server:
> xcopy /s /y /d /c \\%server1%\SomeShare\SomeFolder\*.*  \\%Server2%\etc.
>
>
>
>
Author
7 Apr 2005 10:52 AM
Pegasus (MVP)
You have to be a little more specific. The sample code I gave
you will already prompt you for the server name. You could
therefore enter "Server1" the first time, then "Server63" the
next time. Now why is it that this does not meet your requirement?

It might also be a good idea to post your batch file in your
reply.


Show quoteHide quote
"James" <Ja***@discussions.microsoft.com> wrote in message
news:D0860D55-E79E-4B3A-BAD5-4CCCD1BFACB3@microsoft.com...
> Hi - the code is working fine however I have encountered a problem.  I
have
> alot of servers & I (if possible) would like to be able to select server 1
as
> the source but in another instance select say server 63 in another
instance &
> not have to change the batch file.  Is that possible?
>
> "Pegasus (MVP)" wrote:
>
> >
> > "James" <Ja***@discussions.microsoft.com> wrote in message
> > news:2A5F20F5-EBB7-41AD-90BC-ED461D73AEA5@microsoft.com...
> > > I want to create a batch file that copies files from one server to the
> > other
> > > & should kind of do the following;
> > >
> > > Ask me for the server name & then I input it.
> > > Ask me for the username & then I input it
> > >
> > > Then this copies the files to the other server so it will;
> > >
> > > Ask me the server name to & then I input it.
> > > Ask me for the username & I input it
> > >
> > > I have tried finding a newsgroup for DOS but I can't find it.
> > > If you can help thanks in advance
> > >
> > > James
> >
> > Here is the general idea:
> >
> > @echo off
> > set /p server1=Please enter the name of the source server:
> > xcopy /s /y /d /c \\%server1%\SomeShare\SomeFolder\*.*  \\%Server2%\etc.
> >
> >
> >
> >
Author
6 Apr 2005 12:32 PM
David H. Lipman
Show quote Hide quote
From: "James" <Ja***@discussions.microsoft.com>

| I want to create a batch file that copies files from one server to the other
| & should kind of do the following;
|
| Ask me for the server name & then I input it.
| Ask me for the username & then I input it
|
| Then this copies the files to the other server so it will;
|
| Ask me the server name to & then I input it.
| Ask me for the username & I input it
|
| I have tried finding a newsgroup for DOS but I can't find it.
| If you can help thanks in advance
|
| James


Forget the Command interpreter and all its limitations.
Think about a higher level interpreter such as the Kixtart interpreter (http://kixtart.org,
Kixtart is CareWare).

I also suggest a scripting News Group;   microsoft.public.windows.server.scripting