Jump to content

help with batch files

Craven Morehead

Recommended Posts

Ok I just went through the unattended xp install guide (which is awesome and I thank everyone that has contributed to it.) and I want to make a batch file that will copy the my documents folder and also some specific files to my server. I need you guys to point me in the right direction by answering the following questions.

1. What commands do I need to do this or please link me to a site that will show me.

2. How can I make this batch file run every say 24 hours.

3. If I can't make the batch file run every 24 hours what command do I use to repeat the copy operation every 24 hours and then how do I hide the window.

Thanks for your help.

Link to comment
Share on other sites

The batch file should be somehow like this:

@echo off


cd docume~1

net use q: \\name_of_pc\share_file_name /y

xcopy *.* q:\ /s /d /y

/s -> subdirectories

/d -> only take new files

/y -> without confirmation

Time and date created...

date /t > datetime.txt

time /t >> datetime.txt


type datetime.txt


copy datetime.txt c:

net use q: /d


Now to run every 24hours u must edit scheduler and put the batch file in it.

If u write exactly what u want to copy i can make you the batch file

Link to comment
Share on other sites

If U need it for backup, use robocopy from RK...

If it is for migration, I would recommend U using User State Migration Tool from Microsoft, it is really great tool!

But it looks like roboform and mirror option will be best for U. Could U write some more informations, please?

For scheduling U should use command schtasks or GUI for creating job...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...