Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Recursive FC diff

126 views
Skip to first unread message

Fer Martin

unread,
Oct 25, 2007, 10:06:08 PM10/25/07
to
Hey guys,

have any of you found a way to use FC in a recursive way? I found
there is not a standard way to do it, and I think it's kind of useless
for big applications if you need to go directory per directory
creating diffs.

Any hints?

Thanks in advance,
-Fer Martin

billious

unread,
Oct 26, 2007, 1:28:53 AM10/26/07
to

"Fer Martin" <FernandoMa...@gmail.com> wrote in message
news:1193364368.9...@y27g2000pre.googlegroups.com...

Depends on quite what you mean.

But I've found FC to be a little unreliable. When performing a text
comparison with defaults and there is a line present in one file, missing in
another, it will sometimes report the missing line and two following lines
rather than the normal behaviour - the line each side. The lines involved
appeared to be of no particular significance - not first or last in file,
for instance, and I gain the impression that it might have something to do
with block-boundaries on the read operation.

I've also found that FC occasionally reports that it can't find a file when
there appears to be no reason since the same file can TYPEd and reacts
normally to other commands.Of course, that may have been that particular
system set-up, given that the system in question was maintained by a lying
incompetent lunatic bitch who got me the sack - but I seem to recall its
happening on other systems where networking was involved.

What exactly do you want to do?


Fer Martin

unread,
Oct 26, 2007, 3:16:25 AM10/26/07
to
On Oct 26, 2:28 pm, "billious" <billious_1...@hotmail.com> wrote:
> "Fer Martin" <FernandoMartinSant...@gmail.com> wrote in message

Thanks for your help.
I'm aware of the bad things about FC, but still want to use this tool.

If you type:

>FC c:\dir1\*.* c:\dir2\*.*

you can get all the differences for the files between dir1 and dir2,
but you can't get to any inner directory (c:\dir1\myDirectory\...). So
what I'm looking for is a way to compare, not only files in a
directory, but all the files inside every subdirectory.

Any hints?

Thanks in advance,
Fernando

billious

unread,
Oct 26, 2007, 3:49:56 AM10/26/07
to

"Fer Martin" <FernandoMa...@gmail.com> wrote in message
news:1193382985.5...@k35g2000prh.googlegroups.com...

> On Oct 26, 2:28 pm, "billious" <billious_1...@hotmail.com> wrote:
>> "Fer Martin" <FernandoMartinSant...@gmail.com> wrote in message
>>
>> news:1193364368.9...@y27g2000pre.googlegroups.com..
[snip].

>>
> Thanks for your help.
> I'm aware of the bad things about FC, but still want to use this tool.
>
> If you type:
>
>>FC c:\dir1\*.* c:\dir2\*.*
>
> you can get all the differences for the files between dir1 and dir2,
> but you can't get to any inner directory (c:\dir1\myDirectory\...). So
> what I'm looking for is a way to compare, not only files in a
> directory, but all the files inside every subdirectory.
>
> Any hints?
>
> Thanks in advance,
> Fernando
>

So - are you looking for identical subtrees, or to compare a set of files
against a subtree?

ie
FC c:\(complete subtree dir1)\*.* c:\(complete subtree dir2)\*.*
or
FC c:\dir1\*.* c:\(complete subtree dir2)\*.*

Either way, I'd suggest FOR /R would be a good start (see FOR /? from the
prompt)
or
FOR /F "tokens=*" %%x in ( ' dir /s /b /a:d c:\...... ' ) do ....
which should apply each subdirectory name in c:\...... to %%x

Also need to know what do do about the "file missing" situation where the
file matching the first AFN is missing in the target directory - and
possibly vice-versa.

foxidrive

unread,
Oct 26, 2007, 3:50:09 AM10/26/07
to
On Fri, 26 Oct 2007 00:16:25 -0700, Fer Martin
<FernandoMa...@gmail.com> wrote:

>If you type:
>
>>FC c:\dir1\*.* c:\dir2\*.*
>
>you can get all the differences for the files between dir1 and dir2,
>but you can't get to any inner directory (c:\dir1\myDirectory\...). So
>what I'm looking for is a way to compare, not only files in a
>directory, but all the files inside every subdirectory.

If you want to compare two directory trees then there are better tools.

Here's one I've used in the past:

http://allan.hoiberg.dk/eng/prog_ct.htm


0 new messages