• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

How to create a batch file for copying?

E

Eric

Flightless Bird
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]

Flightless Bird
"Eric" <Eric@discussions.microsoft.com> said this in news item
news:0BA6058A-4560-4610-9872-8E6229F81329@microsoft.com...
> 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

Flightless Bird
Eric wrote:
> 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.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html
 
R

Russ SBITS.Biz [SBS-MVP]

Flightless Bird
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 [MVP]" <news@microsoft.com> wrote in message
news:uzXMtNdkKHA.4380@TK2MSFTNGP04.phx.gbl...
>
>
> "Eric" <Eric@discussions.microsoft.com> said this in news item
> news:0BA6058A-4560-4610-9872-8E6229F81329@microsoft.com...
>> 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.
 
R

Russ SBITS.Biz [SBS-MVP]

Flightless Bird
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 [SBS-MVP]" <russ@REMOVETHIS.sbits.biz> wrote in message
news:#W0cH1dkKHA.2184@TK2MSFTNGP04.phx.gbl...
> 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 [MVP]" <news@microsoft.com> wrote in message
> news:uzXMtNdkKHA.4380@TK2MSFTNGP04.phx.gbl...
>>
>>
>> "Eric" <Eric@discussions.microsoft.com> said this in news item
>> news:0BA6058A-4560-4610-9872-8E6229F81329@microsoft.com...
>>> 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.

>
 
Top