Copy And Shutdown Batch file

August 18, 2010 at 00:54:28
Specs: Windows XP, 512
I have been searching the internet for help with this and I don’t seem to be getting any ware. I want to write a batch file that copies the documents and settings folder to a second hard drive on shutdown. What I have so far is only a test: -

@echo off
xcopy c:\testsource D:\testbackup /m/e/y

What I want to be able to do is copy the documents and settings folder when I close windows XP down, it would be good to have this batch file loaded on start up so when the computer shuts down it starts automatically, I would also like it to copy new or changed files rather than overwrite everything all the time. I have seen on the internet programs that can do this for you but that all fine and well when you have money to buy them, but I don’t.

Please can someone help me in my hour of need?

Many Thanks
Tor Fey


See More: Copy And Shutdown Batch file

Report •

#1
August 18, 2010 at 01:41:07
If a file has been changed in any way, the achive bit is set. Use xcopy /? to see, how to use the command with archive bit.

Right after the xcopy command, you can use the command shutdown to shutdown your computer.
First use shutdown /? on a command prompt to learn, how to use the command with the correct parameters.

The original poster should always write the last response !!!
Let us know, if the problem is solved !!!


Report •

#2
August 18, 2010 at 02:44:43
Thanks for the reply :@)

Would anyone be able to provide me with a sample code?

Thanks
Tor Fey


Report •
Related Solutions


Ask Question