Synchronize/compare files&directories

Something is missing in Far Manager? You have a great idea that should be heared? Write here.
Locked
pp
Posts: 25
Joined: Wed Mar 23, 2005 1:54 pm
Location: Czech Republic
Contact:

Synchronize/compare files&directories

Post by pp » Wed Apr 26, 2006 7:14 am

Hi all,

what do you use for comparing of files and directories?

I need to compare tens of source files every day and look for changes in them. I can highlite the files which differ by Advanced Compare plugin, but I don't know, how to open both files in one screen to see the different rows. Is there any other possibility than using fc.exe utility for each two files?

I'd imagine something like in Total Commander is function "Synchronize dirs". Or at least the "Compare by content" function, which can simply compare two files of same name and show source with differencies.

Thanks for every help.
Last edited by pp on Tue Oct 24, 2006 2:45 pm, edited 1 time in total.

HaRT
Posts: 100
Joined: Thu Mar 09, 2006 6:33 pm
Location: St. Petersburg, Russia

Post by HaRT » Wed Apr 26, 2006 7:57 am

I. Console:
 1. Far:
  a. TwoEdit — very limited
 2. Other:
  a. FC.EXE (native)
  b. diff (from the ported GNU text utilities)
  c. vimdiff (from the ported VIM editor)
II. GUI
 1. Free
  a. KDiff3
  b. WinMerge
 2. Other
  a. Araxis Merge
  b. DIFFzilla
  c. Beyond Compare
  d. CompareIt!

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Wed Apr 26, 2006 10:01 am

pp
For example add this to the UserMenu (F2)

edit:<diff -c -p "!#!\!^!.!" "!\!.!"

it will compare two files of the same name from the left and right panel and show the resulting difference in the editor. Looks very good if you have Colorer. You need GNU diff which you can get here http://gnuwin32.sf.net

pp
Posts: 25
Joined: Wed Mar 23, 2005 1:54 pm
Location: Czech Republic
Contact:

Post by pp » Wed Apr 26, 2006 3:28 pm

t-rex

Unfortunatelly after running edit:<diff -c -p "!#!\!^!.!" "!\!.!" I'm getting this output:
diff: !#!\!^!.!: No such file or directory
diff: !\!.!: No such file or directory

The edit command itself works fine (e.g. edit:<dir), but the "!" is not being replaced by filename. Do you have any idea, where could be the problem? Maybe some special settings?

I'm using version 1.70 (build 2087), W2k. I've also tried to delete all the settings from registry, but still it is the same.

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Wed Apr 26, 2006 3:45 pm

pp
You don't run it from the command line - you should add it to the UserMenu (F2).

pp
Posts: 25
Joined: Wed Mar 23, 2005 1:54 pm
Location: Czech Republic
Contact:

Post by pp » Wed Apr 26, 2006 3:56 pm

t-rex: You don't run it from the command line - you should add it to the UserMenu (F2).

Cool, from UserMenu it works, thanks! I did expect (wrongly) that it will work from command line as well.

pp
Posts: 25
Joined: Wed Mar 23, 2005 1:54 pm
Location: Czech Republic
Contact:

Post by pp » Wed Apr 26, 2006 3:58 pm

HaRT

TwoEdit
Something like this would be useful, but I need it to detect and highlight changes automatically. Not only let me read both files and keep searching...

FC.EXE, diff
I use these tools now. I believe it is good when there is only a few changes and when you compare only a few files, but otherwise (which is my case) the result is not too well-arranged. I think it is always more transparent to have the results of two files compare in two "resultfiles" than merged in one.

GUI
Thanks for your suggestions at this point. I'm afraid, that finally I'll have to use one of those 3rd party programs :-(

xxbbcc
Posts: 16
Joined: Wed Aug 24, 2005 5:07 pm
Location: Hungary / USA

Post by xxbbcc » Sat May 13, 2006 5:36 am

Beyond Compare is quite excellent, maybe the best fileset compare tool I've ever used (I use it for about 2 years now, quite frequently.) I don't mind that Far doesn't have its features - Far is very good at managing files and Beyond Compare is very good at comparing files and folders. (It also has some minimal file management functionality.)

I rather have two excellent programs with no overlapping features than have a mediocre one with all features included.

techie
Posts: 28
Joined: Thu Feb 23, 2006 8:11 pm

Post by techie » Fri Jun 16, 2006 3:45 pm

For good syncronization simple date compare is just not enough - additional information must be kept within or files will never be deleted. Might be a SVN like approach, with meta-information only. However, the structure of this information is yet to be designed. I think Palm HotSync is the best and most popular implementation of synchronization protocol. Wonder if there are any standards for this?

samiller
Posts: 1
Joined: Wed Dec 27, 2006 8:18 pm

Post by samiller » Wed Dec 27, 2006 9:25 pm

As for file compare tools, I would also recommend a Compare Suite.

Also, there is a good resource for compare and merge tools, all tools mentioned here are reviewed there by features.

Locked