No announcement yet.

Dealing with archive file differences

  • Filter
  • Time
  • Show
Clear All
new posts

  • Dealing with archive file differences

    I have a script that will compare two folders. Some of the folders contain a number of .jar files.

    I want the script to copy any differences in the right folder to a new location. If there is a difference in a jar file I want it to copy the whole jar file, not just the differences. Is there any way to achieve this?

    The problem is that if I have my default session settings for Archive Handling set to 'As file Always', my jar files are shown as different - even when the contents are the same (I guess something to do with checksums during JAR creation).
    So my script will always copy over the Jar files, even though they have not changed in terms of content.

    If I have the Archive Handling set to 'As Folders Always' I only get the parts of the .jar file that have changed - but I want the whole jar file.

    The same behaviour is shown in the GUI - the setting is 'As File Always', the Jars are highlighted as different, but in 'As Folders Always', they are shown to be the same.

    So is there a way around this? Any advice appreciated.

  • #2
    Hello David,

    You can perform this action interactively by having a session that deals only with jars:
    Session Settings, Handling: Treat archives Always as Folders
    Filters set to: *.jar;*.jar/.../*
    Comparison set to Rules-based. Disable Timestamp (unless you do not want to copy older, but different files from the Source to Destination).

    This should treat jars as folders, and only shows the jars and the contents within.

    Then set Display Filter to Only Differences. Expand All to see the contents of the Jars (Display filter to Show all to preview all changes).

    Collapse all, Display filter set to Only Differences, and Select All will select the Jar files that are different. Use Shift+Left Arrow to select only that side, and then perform a copy on the selection. This will copy the Jar files.

    Scripting is not capable of this because we do not have Display Filters in script. Instead we use the select command to select lt.diff. However, we do not compare folders so the Folders are not different, only the files inside. So we cannot select the collapsed .jar folders in script. We cannot perform a select all since we cannot show only the different folders.

    From script, you could expand all and generate a folder-report of just the differences in XML format, then parse the XML and use another program to copy only the jar files found.

    I will add this use case to our Customer Wishlist. Thanks for sharing it with us, and letting us know in detail how you use the application and the issue you were running into.
    Aaron P Scooter Software


    • #3
      Any updates on this functionality?
      Thank you in advance!


      • #4
        I'm afraid not. It is still on our Wishlist, but we haven't been able to schedule or investigate this yet.
        Aaron P Scooter Software