How to create a batch file for copying?

E

Eric

Does anyone have any suggestions on how to create a batch file?
I would like to copy everything within D drive into G drive, and overwrite
anything without request for any confirmation. After that, shut down my XP
window.
Does anyone have any suggestions on how to code this batch file?
Thanks in advance for any suggestions
Eric
 
P

Pegasus [MVP]

Eric said:
Does anyone have any suggestions on how to create a batch file?
I would like to copy everything within D drive into G drive, and overwrite
anything without request for any confirmation. After that, shut down my XP
window.
Does anyone have any suggestions on how to code this batch file?
Thanks in advance for any suggestions
Eric

Here you go:
@echo off
xcopy d:\*.* g:\ /s /y

If you are dealing with large amounts of data then this option is
preferable:
@echo off
robocopy d:\ g:\ *.* /s /is /w:1 /r:1

You can download robocopy.exe from here:
http://www.microsoft.com/downloads/...69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en.
To see its many switches, type robocopy /? at the Command Prompt.
 
S

Shenan Stanley

Eric said:
Does anyone have any suggestions on how to create a batch file?
I would like to copy everything within D drive into G drive, and
overwrite anything without request for any confirmation. After
that, shut down my XP window.
Does anyone have any suggestions on how to code this batch file?
Thanks in advance for any suggestions

xcopy /?
shutdown /?
start /?

Use those (with appropriate modifiers per the /? help you get) in a batch
script together.
 
R

Russ SBITS.Biz [SBS-MVP]

Sorry you wanted a batch process.
You can try SyncBackSE
it schedules file copies very well and the free version does a excellent job
with logging.
Russ

--
Russell Grover - SBITS.Biz [SBS-MVP]
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz
Microsoft Online Services - http://www.microsoft-online-services.com


Russ SBITS.Biz said:
Try RichCopy 4.0
It's Robo Copy on steroids

http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog

--
Russell Grover - SBITS.Biz [SBS-MVP]
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz
Microsoft Online Services - http://www.microsoft-online-services.com


Pegasus said:
Here you go:
@echo off
xcopy d:\*.* g:\ /s /y

If you are dealing with large amounts of data then this option is
preferable:
@echo off
robocopy d:\ g:\ *.* /s /is /w:1 /r:1

You can download robocopy.exe from here:
http://www.microsoft.com/downloads/...69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en.
To see its many switches, type robocopy /? at the Command Prompt.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top