|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
batch file helpI 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
Show quote
Hide quote
"James" <Ja***@discussions.microsoft.com> wrote in message Here is the general idea: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 @echo off set /p server1=Please enter the name of the source server: xcopy /s /y /d /c \\%server1%\SomeShare\SomeFolder\*.* \\%Server2%\etc. 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. > > > > 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. > > > > 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. > > > > > > > >
Show quote
Hide quote
From: "James" <Ja***@discussions.microsoft.com> Forget the Command interpreter and all its limitations.| 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 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
cannot rename file cannot delete file.
Bootup Tuning Reinstalling windows with installed programs on a different partit Cannot host a meeting using netmeeting sony Clie Windows 2003 Remove Schema Changes Windows 2k installed twice and reinstalling windows The password does not meet the password policy requirements change date/time stamp Uptime windows2003 |
|||||||||||||||||||||||