Sign in with
Sign up | Sign in
Your question

Writing batch files

Last response: in Windows 2000/NT
Share
Anonymous
April 15, 2004 2:19:51 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

Hello all,

I have a Windows NT 4 service pack 6 server using Backup Exec Version 8.5
Rev. 3571 which isn't backing up over the network properly. What I would
like to do is write a batch file that would copy a folder from a machine on
the WAN and put the contents into a predefined folder on the machine with
Backup Exec, so when the backup runs, we also get a backup of the other
machines contents.

Is this something that can be done. Two of the machines that I want to pull
the information from are Windows NT machines, the other is a Windows 2000
machine. Where would I begin to look for something that can help me write
such a file?

Thanks, Gale

More about : writing batch files

Anonymous
April 15, 2004 2:40:04 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

Yes, that assumes there is a share named D on that server or an admin can
use the administrative share D$ so something like
xcopy "F:\Corel\Docs" "\\NTFSMT\D$\Corel\BRO Docs" /v /q /y

If you have IE5 or later installed then you can use Task Scheduler to
schedule the shell script but remember that mapped drives won't exist when
no one is logged on so use UNC paths instead for both source and destination
for the copy; something like
xcopy "\\server1\C$\Corel\Docs" "\\NTFSMT\D$\Corel\BRO Docs" /v /q /y

Also If using Windows NT due to slight difference in xcopy I don't think you
need to use the /y switch. Also you'll want to use an account that has
permissions to access the network resources.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


"Gale Coleman" wrote:
| Hi Dave,
|
| So say I have a network drive F and I want to copy from that the folder
| "Docs" under the folder "Corel". I want to then copy them to the server
| named NTFSMT, D drive under the folder Corel/BRO docs.
|
| I would write:
|
| xcopy "F:\Corel\Docs" "\\NTFSMT\D\Corel\BRO Docs" /v /q /y
|
| How would I set this off so it does it at a time that I want it done, but
| not have to be here to push a button?
|
| Thanks,
|
| Gale
|
|
Anonymous
April 15, 2004 4:52:32 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

OK, I keep getting a file not found = BRO Docs error, this is what I wrote:

I want to copy a file practice.frm (for testing purposes from the remote
server NTFSBIS) to my local server NTFSMT. This is what I used:

xcopy "\\NTFSBIS\C$\Corel\Documents
BRO\Consumer\Exemptions\Forms\practice.frm" "\\NTFSMT\D$\Corel\BRO Docs "
/v/q

What am I doing wrong?

Thanks, Gale
Related resources
Anonymous
April 15, 2004 4:52:33 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

The space on the end may be the problem. Change
"\\NTFSMT\D$\Corel\BRO Docs "
to
"\\NTFSMT\D$\Corel\BRO Docs"


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


"Gale Coleman" wrote:
| OK, I keep getting a file not found = BRO Docs error, this is what I
wrote:
|
| I want to copy a file practice.frm (for testing purposes from the remote
| server NTFSBIS) to my local server NTFSMT. This is what I used:
|
| xcopy "\\NTFSBIS\C$\Corel\Documents
| BRO\Consumer\Exemptions\Forms\practice.frm" "\\NTFSMT\D$\Corel\BRO Docs "
| /v/q
|
| What am I doing wrong?
|
| Thanks, Gale
|
|
Anonymous
April 15, 2004 5:40:39 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

Yeah, I got part of it now by doing the following:

xcopy "S:\Corel\documents bro\consumer\exemptions\forms" "N:\Corel\BRO docs"
/v/q

The only problem now is how do I save this command to call it up in the task
schedular? The machine is always logged into, but locked, so I don't think
there is a problem there.

Another question is how do I get the other two servers into the mix? Do I
just make 3 separte xcopy things and run them at different time?

Gale
Anonymous
April 15, 2004 5:40:40 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

Save a file as
somename.cmd
and paste the line in it (or all three lines if desired)

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


"Gale Coleman" wrote:
| Yeah, I got part of it now by doing the following:
|
| xcopy "S:\Corel\documents bro\consumer\exemptions\forms" "N:\Corel\BRO
docs"
| /v/q
|
| The only problem now is how do I save this command to call it up in the
task
| schedular? The machine is always logged into, but locked, so I don't
think
| there is a problem there.
|
| Another question is how do I get the other two servers into the mix? Do I
| just make 3 separte xcopy things and run them at different time?
|
| Gale
|
|
Anonymous
April 15, 2004 6:28:05 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

One last time (I hope)

I paste the line that works into Word Pad and save the file with
whatevername.cmd, put it on the hard drive somewhere and go through task
schedular and tell it when to run and it will do it?

Thanks
Anonymous
April 15, 2004 6:28:06 PM

Archived from groups: microsoft.public.windowsnt.misc (More info?)

Yes, that should do it. Use notepad.exe though so we don't get any control
characters in the file.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


"Gale Coleman" wrote:
| One last time (I hope)
|
| I paste the line that works into Word Pad and save the file with
| whatevername.cmd, put it on the hard drive somewhere and go through task
| schedular and tell it when to run and it will do it?
|
| Thanks
|
|
!