Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:30:37+00:00 2026-05-25T18:30:37+00:00

I need to compare two directories, and produce some sort of structured output (text

  • 0

I need to compare two directories, and produce some sort of structured output (text file is fine) of the differences. That is, the output might looks something like this:

file1 exists only in directory2
file2 exists only in directory1
file3 is different between directory1 and directory2

I don’t care about the format, so long as the information is there. The second requirement is that I need to be able to ignore certain character sequences when diffing two files. Araxis Merge has this ability: you can type in a Regex and any files whose only difference is in character sequences matching that Regex will be reported as identical.

That would make Araxis Merge a good candidate, BUT, as of yet I have found no way to produce a structured output of the diff. Even when launching consolecompare.exe with command-line argumetns, it just opens an Araxis GUI window showing the differences.

So, does either of the following exist?

  • A way to get Araxis Merge to print a diff result to a text file?
  • Another utility that do a diff while ignoring certain character
    sequences, and produce structured output?

Extra credit if such a utility exists as a module or plugin for Python. Please keep in mind this must be done entirely from a command line / python script – no GUIs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:30:38+00:00Added an answer on May 25, 2026 at 6:30 pm

    To some extent, the plain old diff command can do just that, i.e. compare directory contents and ignoring changes that match a certain regex pattern (Using the -I option).

    From man bash:

    -I regexp
          Ignore changes that just insert or delete lines that match  regexp.
    

    Quick demo:

    [me@home]$ diff images/ images2
    Only in images2: x
    Only in images/: y
    diff images/z images2/z
    1c1
    < zzz
    ---
    > zzzyy2
    
    [me@home]$ # a less verbose version
    [me@home]$ diff -q images/ images2
    Only in images2: x
    Only in images/: y
    Files images/z and images2/z differ
    
    [me@home]$ # ignore diffs on lines that contain "zzz"
    [me@home]$ diff -q -I ".*zzz.*" images/ images2/
    Only in images2/: x
    Only in images/: y
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need to compare two directories and check through every file in both directories for
We need a script that will compare two directories of files and for each
I need to compare two text files (in different directories) to see if they
I sometimes need to compare two text files. Obviously, diff shows the differences, it
Im totally newbie in shell script. Im need compare file name in two directories
I need to compare two bitmaps. One bitmap is loaded from a file, the
When you need to compare two tables to see what the differences are, are
I need to compare two strings, containing HTML text. The test should return true
I have two directories with the same list of files. I need to compare
In some PHP I need to compare two strings, but only on the bits

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.