Sign in with
Sign up | Sign in
Your question

Create batch file

Last response: in Windows 7
Share
March 8, 2010 8:42:55 AM

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.

More about : create batch file

March 8, 2010 9:58:05 AM

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.
m
0
l
March 8, 2010 10:21:50 AM

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.
m
0
l
Related resources
a b $ Windows 7
March 8, 2010 8:53:47 PM

Don't use xcopy, use either "replace" or "robocopy", they will do this for you.

Use the /? for command switches.
m
0
l
March 9, 2010 7:04:03 AM

das_stig said:
Don't use xcopy, use either "replace" or "robocopy", they will do this for you.

Use the /? for command switches.

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.
m
0
l
March 9, 2010 1:16:19 PM

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...
m
0
l
!