Dear all,
I have two folders containing many xml-files, and I would like to filter out which files that has a different content file to file - but ignoring two specifik XML-elenents.
Example (just a part of the XML):
<mes:Header>
<mes:OriginatingCountry>XX</mes:OriginatingCountry>
<mes:DestinationCountries>YY</mes:DestinationCountries>
<mes:MessageId>XX05060eea3e9cfc812992f3750e018e07</mes:MessageId>
<mes:Timestamp>2024-02-02T16:39:15</mes:Timestamp>
</mes:Header>
It is the value in the elements mes:MessageId and mes:Timestamp i would like to ignore.
I have tried several attempts with input from ChatGPT using the Synchronize Maps-function and adding the Filter in the By Content Plugin.
For filetype i have tried both '*.xml' as well as '*.*'.
Different filters suggested by ChatGPT:
*-<mes:MessageId>*|*-<mes:Timestamp>*
*<*mes:MessageId>*|*<*mes:Timestamp>*
But when compraing, all files is detected as different (the option Ignore Date is checked).
Help would be much appreciated.
Best regards
Peter
Compare all files in two folders By Contents - ignore specific XML-elements
Moderators: Hacker, petermad, Stefan2, white
Re: Compare all files in two folders By Contents - ignore specific XML-elements
This ChatGPT suggestions are pure nonsense.
There is no Synchronize Maps-function in TC.
To my knowledge, the only TC Content Plugin for comparison is the PCREsearch content plugin
which can be used to Synchronize Dirs, but it's not applicable here.
I have configured Beyond Compare as external compare tool in TC.
It contains a set of pre-defined rules, including XML
Here you can add your strings as unimportant text.
There is no Synchronize Maps-function in TC.
To my knowledge, the only TC Content Plugin for comparison is the PCREsearch content plugin
which can be used to Synchronize Dirs, but it's not applicable here.
I have configured Beyond Compare as external compare tool in TC.
It contains a set of pre-defined rules, including XML
Here you can add your strings as unimportant text.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
- ghisler(Author)
- Site Admin
- Posts: 50406
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Compare all files in two folders By Contents - ignore specific XML-elements
There is no out of the box solution. You would have to write your own content plugin implementing the function ContentCompareFiles. You can see how this work in my sample plugin:
https://plugins.ghisler.com/content/wdx_filesys_src.zip
Here the ContentCompareFiles function compares two text files while ignoring different types of line breaks (carriage return, line feed, or both). The function can then be used in "synchronize dirs" by checking "by content" and clicking on the button behind it.
https://plugins.ghisler.com/content/wdx_filesys_src.zip
Here the ContentCompareFiles function compares two text files while ignoring different types of line breaks (carriage return, line feed, or both). The function can then be used in "synchronize dirs" by checking "by content" and clicking on the button behind it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com