Jump to content











Photo
- - - - -

Synchronizing files from multiple location


  • Please log in to reply
8 replies to this topic

#1 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 31 December 2011 - 01:45 PM

I have two folders, viz, A & B, with the same sub-folder structure. My aim is to synchronize/mirror those two folders with a third folder C. It means that a file will exist in folder C if it exists either in A or in B. Again, if a file is deleted from either A or B, corresponding file will get deleted from folder C also. Does anyone know if there is any software to satisfy my need?

#2 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 31 December 2011 - 10:25 PM

Is it possible to just mirror all three folders A=B=C

Then that could be easily done with RoboCopy /MIR

#3 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 01 January 2012 - 05:59 AM

Then that could be easily done with RoboCopy /MIR

Does robocopy accept multiple sources?

#4 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 01 January 2012 - 06:38 AM

I was thinkin' more like a batch
RoboCopy A -> C
RoboCopyB -> C

Or any combination thereof.
Put RoboCopy.CMDs on each drive and then you could CALL each .CMD in any way you wanted.

#5 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 01 January 2012 - 06:40 AM

I was thinkin' more like a batch
RoboCopy A -> C
RoboCopyB -> C

While syncing A with C, robocopy will delete those which are not in A but in C.
While syncing B with C, robocopy will delete those which are not in B but in C.

The end result will vary. Think a bit.

#6 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 01 January 2012 - 07:05 AM

Don't use /MIR use /CopyAll

#7 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 01 January 2012 - 11:25 AM

Don't use /MIR use /CopyAll

No, I just tested /CopyAll switch.
As I expected that once copied, if any file is deleted at the source, does not get deleted at the destination thereafter.

#8 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 01 January 2012 - 12:11 PM

Should be easy to write a small app for that in one (Latin) hour.

Only issue: A and B both have a file with the same name, but the files contents are different.

How to decide: Create date, change date, length, ...?

Suggestion: The app does not really perform the copy for these problematic files. It creates a batch which can be edited by the user before executing.
The unproblematic files are copied directly.

Syntax: SyncEx <source directory1>,<source directory2>,<source directory3>,... <pattern> <target directory> [/R] [/E]

Peter

#9 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 01 January 2012 - 02:03 PM

Should be easy to write a small app for that in one (Latin) hour.

Only issue: A and B both have a file with the same name, but the files contents are different.

How to decide: Create date, change date, length, ...?

Conflict resolution can be done in various ways, e.g. user's decision, Overwrite older, Overwrite smaller etc.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users