Create batch file

OzZzZz

Distinguished
Jan 31, 2010
9
0
18,510
Hey evrybody
I'm want to create batch file that copy folder and subfolders from one computer to another.
I want to put the file in Scheduled Tasks to create copy of the files evry 2 hours but do not overweight the existing files.
If the existing files are modified then overweight the file but do not promp about it, just copy automatically the files.
Thank you all.
 

Collie147

Distinguished
Feb 25, 2010
354
0
18,810
What version of windows are you running? Can you not just turn on syncronization on the folder?

If you want to create a batch file do it in notepad, using the command 'xcopy' but I'd recommend going to command prompt (start, run, then type cmd) and typing 'xcopy /?' to find your options.
 

OzZzZz

Distinguished
Jan 31, 2010
9
0
18,510
Windows 7.
I know that "xcopy" is good solution but i can't find switch that don't overweight the file are existing or copy just the file that change.
 

OzZzZz

Distinguished
Jan 31, 2010
9
0
18,510

but in xcopy ther is this option:
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
and this is what i'm looking for.
 

nocheese

Distinguished
Sep 22, 2009
219
0
18,710
ROBOCOPY copy as...

/XN Excludes files tagged as Newer.
/XO Excludes files tagged as Older.

And...

Exclude files according to their age.
The /MAXAGE:n and /MINAGE:n options exclude files older than /MAXAGE:n or newer than /MINAGE:n, respectively.

All the flexibility you ever wanted but was afraid to ask...