back up questions

I have this back up script which runs every night. The problem is that when the code runs the first time it works perfect but when it runs the second day it dose not look to see for changes to add It simply looks at the folder name and if it is there then moves on. How do I make it check inthe subfolders for chagnes and save those files.

net session /delete /Y
xcopy /o /e /v /y F:\ H:\
eteranAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

eteranAuthor Commented:
I have win2k server
0
3_SCommented:
you could first do a complete delete of all file on you H:
are there files on the H: which aren't any more on the F: and you have to keep? Or you just want to take every night an exact copy of the F: ?
You are talking about how much data (MB,GB,??)
0
eteranAuthor Commented:
TRhe data about is to much to take out and replace. The data amount is 75 gigs. I would like it to compare each file and take the change files only
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

3_SCommented:
I tried your command and it is working perfect for me.

If a file is deleted in you original folder it stays in your archive folder. Is this the problem you are looking at.

Changed files (in folder or subfolder) are overwritten with your xcopy command.

change line as followed to test the script (after running the script you should see the result of you xcopy command) I don't thing there's somebody at night looking what the script is doing exactly
xcopy /o /e /v /y F:\ H:\  > c:\temp\log.txt      
0
eteranAuthor Commented:
> c:\temp\log.txt   this will create  a log file for me.?
0
3_SCommented:
Yes this will create a log file.
check this file in the morning to see if everything went well during the nightly copy
you can adjust the path to your needs, or change filename

use >> if you want to append to file, but be carefull that your disk does not run full if you append
0
eteranAuthor Commented:
For some resaon when I run this code I see the command window pop up and go away right awway.  While if I delete everything in j:\ and run the script you see it transfer everthing. Why would this be.
net session /delete /Y
xcopy /o /e /v /y F:\ J:\ > c:\temp\log.txt
0
3_SCommented:
Open a dosbox (command window) and type in the command manually (this way the command window does not go away and you can read what is happening)

is there something in you log.txt? maybe error message?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.