Computing.Net > Forums > Programming > .bat Automatically Overwrite ??

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

.bat Automatically Overwrite ??

Reply to Message Icon

Name: Scizzy
Date: May 4, 2005 at 14:57:45 Pacific
OS: Windows XP Home w/ SP2
CPU/Ram: Sempron 2800+ // 512 DDR
Comment:

Hi guys,

I have a server and my laptop, and my server has all my important files. I recently wrote a small .bat file to copy the contents of a specific folder from my laptop to my (mapped) server harddrive for backup every night.

This is the jist of what it looks like... very simple.

Xcopy /s "C:\foldername\foldername" "z:\foldername"

thats it...

What I want to know is, every night when it copies... It asks on the first file, overwrite (yes,no,all)?

Is there any way that I can make the .bat automatically select no, yes, or all...

I just want it to copy the new files that I save into this folder, and It stops and asks me, and I want this to be an automatic bat file. I want it to do it with me unattended.

Can anybody help me out?

Thanks a lot,
Scizzy



Sponsored Link
Ads by Google

Response Number 1
Name: wizard-fred
Date: May 4, 2005 at 16:35:04 Pacific
Reply:

/Y will automatically copy the files
/U will update the files

Check XCOPY help for other options you may want to use.


0

Response Number 2
Name: Mechanix2Go
Date: May 4, 2005 at 21:37:40 Pacific
Reply:

I use these in my backup:

/s/r/y/d/c

s subdirs
r read-only
y yes
d newer only
c continue if error


M2


If at first you don't succeed, you're about average.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


RecordSet help vb6 A VB Code for Printed pag...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: .bat Automatically Overwrite ??

Random Help Required
    Summary: My friends and I could do with some help ! We are an internet gaming clan and would like to write (or receive) a .bat file to do the following. Attach 1 of 9 values at random to the end of a text sent...
www.computing.net/answers/programming/random-help-required/15090.html

Bat script overwrite text file
    Summary: I need help with script that shows uptime of 50 pc's. The script run once a week and it works but i would like the script to overwrite last week results. I have tried > but it doesn't write anything o...
www.computing.net/answers/programming/bat-script-overwrite-text-file/17334.html

Batch Coding - User input; response
    Summary: I am writing a script the executes .exes and .bats automatically, eliminating any humna error... I have run into a snag, can anyone help? [code] @ECHO OFF :: START install start /wait install.exe set ...
www.computing.net/answers/programming/batch-coding-user-input-response/13526.html