nephilim
(Fresh Scripter)
2002-11-22 05:03 PM
curious (how automated sync between two machine at logon?)

the hypothetical scenario:

machine x and machine y have the same directory structure (for argument's sake; the directory contains 20 subdirs, which may or may not contain sub-subdirs, etc).

machine y is used as an everyday machine, making changes frequently to the materials contained within the dir structure. machine x is treated as a repository- a safe file server of sorts to keep copies of the materials within the dir.

how would you recommended constructing an automated sync at logon using kix (and other small utilites if necessary) so that every dir and subdir were examined at logon- and only the latest (newest, most recent that is) files were transfered from machine y to machine x?

(MCA: extend subject)

[ 08. December 2002, 23:46: Message edited by: MCA ]


Sealeopard
(KiX Master)
2002-11-22 05:04 PM
Re: curious (how automated sync between two machine at logon?)

Type
code:
xcopy /?

at the command prompt and take a look at the /D parameter.

[ 22. November 2002, 17:05: Message edited by: sealeopard ]


Les
(KiX Master)
2002-11-22 05:06 PM
Re: curious (how automated sync between two machine at logon?)

Look at the RK util, ROBOCOPY.

Howard Bullock
(KiX Supporter)
2002-11-22 05:08 PM
Re: curious (how automated sync between two machine at logon?)

The simplest solution would be to use "XCOPY /D /E", but that is could fail is the client date/time were to be set backward somehow.

Jack Lothian
(MM club member)
2002-11-22 06:34 PM
Re: curious (how automated sync between two machine at logon?)

I would probably use Robocopy for NT/2000/XP & XXCOPY for Win9x but there have been several pure kix solutions posted & discussed in the past. Try checking out the UDF forum (or better still use Howard's link above). It may contain components of the solution you need.

[ 22. November 2002, 18:36: Message edited by: Jack Lothian ]


Les
(KiX Master)
2002-11-22 06:49 PM
Re: curious (how automated sync between two machine at logon?)

Maybe I'm missing something but doesn't XCOPY only work in one direction? If a file is deleted, the deletion won't be replicated, meaning the replica will still have the file.

ROBOCOPY will delete the replica as well.


Howard Bullock
(KiX Supporter)
2002-11-22 06:58 PM
Re: curious (how automated sync between two machine at logon?)

Yes Les you are correct. XCOPY does not remove files from the destination like Robocopy's /Mirror switch.

But quick and dirty XCOPY...gives you the added benefit of backup when the user accidentally deletes something and does not know it for two days.

Personally if I want to sync, I probably would configure the OS to do that since it is now a feature.


nephilim
(Fresh Scripter)
2002-11-22 07:38 PM
Re: curious (how automated sync between two machine at logon?)

great thoughts everyone. thanks.

as everyone has collectively stated, i've seen 3 possible solutions:

xcopy
robocpy
OS native

personally, i am partial to the first two...for my taste, they are less cumbersome and feel more flexible. However, I will check out Howard and Jack's suggestion to peruse the UDF as well. Nice to see that everyone has different ways of doing the same things- great to collect all the options first than figure out what works best for the given scenario.

thanks again everyone. and other comments/thoughts are welcome. i'll post my end solution soon.


MCA
(KiX Supporter)
2002-12-08 11:44 PM
Re: curious (how automated sync between two machine at logon?)

Dear kdyer, lligetfa,

Possible it can be very interesting to create a FAQ item, which handles about
- copying files and directories
- copying it with or without rights
- copying only files which already exist
- copying only the files of last seven days

We are thinking about the different commands like
- XCOPY
- XXCOPY
- ROBOCOPY
greetings.


Les
(KiX Master)
2002-12-08 11:58 PM
Re: curious (how automated sync between two machine at logon?)

MCA,
You are more than welcome to compose such a FAQ.


LonkeroAdministrator
(KiX Master Guru)
2002-12-08 11:59 PM
Re: curious (how automated sync between two machine at logon?)

[Wink]