Diff Files and Dirs: Enable to run these tasks also from command line

Are you missing a feature? Request it's implementation here.
tatra603
Posts: 72
Location: Prague, the Czech Republic, Europe

Diff Files and Dirs: Enable to run these tasks also from command line

Fri Feb 12, 2016 3:26 pm

Hello,

I would like to ask You to add a feature to Diff Dirs and Files. I would like to be able to run these tasks (Diff Dirs and Files) also from command line. Then saving the output to XML file for further processing is necessary.

Use case: To be able to script these tasks and perform them regullary from cron.

I already consulted it by Octavian on XML Prague 2016.

Thank You in advance, Stepan
florin
Posts: 53

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Fri Feb 12, 2016 5:17 pm

Hello,

I've just filed a new improvement request on our internal issue tracking system to add the possibility to run the compare tools from the command line and generate output files containing the comparison results in XML format.

You'll be notified when this feature will be available.

Best Regards,
Florin
Florin Avram
<oXygen/> XML Editor
Radu
Posts: 5217

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Mon Feb 15, 2016 12:12 pm

Hi Stepan,

We'll consider this but right now we do not have plans to add command line utilities or API for comparing files.
There are products like Delta XML which could be used for this:

http://www.deltaxml.com/

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
tatra603
Posts: 72
Location: Prague, the Czech Republic, Europe

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Mon Feb 15, 2016 6:37 pm

Radu wrote:but right now we do not have plans to add command line utilities or API for comparing files


Well, I think, that we both are missed something ;-) Just because oXygen already provides almost complete requested functionality, as I discovered it just know while reading diffDirs.bat and diffFiles.bat.

Just run these commands on command line (I am using oXygen Developer 15.2 Professional):

Code: Select all

diffDirs C:\temp\temp\a C:\temp\temp\b

diffFiles C:\temp\temp\a\test.txt C:\temp\temp\b\test.txt


Both these commands opened appropriate oXygen tool and perform desired comparsion. The only few missing features is to:
  • save the result of comparsion into XML file (the feature, I requested in another thread),
  • maybe add the command line switch with the path to the XML configuration file with diff options like oXygen has already in oXygen wide configuration; if no switch provided, use oXygen's one.

So it looks like the complete implementation of command line functionality should not be so hard and time consuming, am I right? Of course, if there would be enough consumer's demand.

Regards, Stepan
Radu
Posts: 5217

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Tue Feb 16, 2016 12:03 pm

Hi Stepan,

Ok, initially I understood that you wanted to run the Diff Files and save to a result XML format without any GUI or user interaction, so that you could for example create a script which would save the comparison results for lots of files in a folder (some kind of batch operation).
Would you have a proposal about how that comparison XML file would look like? What would you do with it?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
super-structure
Posts: 2

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Fri Aug 19, 2016 12:45 am

Hi,

I think I've run into the exact same limitation as has Stephan. I'm using oXygen Developer v18 and I regularly use the Diff tools to update XSL publishing files between various servers (as well as a few other filetypes).

I would envision the following usage:

Run the Diff tool via command line with some flag set to run "quiet" and another to generate an output XML file. The file would be basically an XML tree much like what is graphically presented in the GUI tool. For each folder or file on either side (for the DiffDir tool, at any rate), an attribute would have a value of "eq", "ne", "x1", or "x2" for "equal", "not equal", "missing on first directory", or "missing on right directory".

I would then parse this file for an attribute other than "eq". If present, then I would re-run the DiffDir tool, launching the graphics mode to investigate further (i.e, flag for "quiet" and generate XML file off).

Lastly, it appears that running the current command line cannot be done in series. That is, once I close the DiffDir GUI tool, it closes the command line opened from a batch file rather than proceeding on to the next line in the batch file. Is this intentional behavior? Perhaps user error on my part (never discount that one!)? Thanks for considering expanding the command line tool. I feel that even with a competing product like MergeXML, I will always prefer the features available in the oXygen suite of tools.

Sincerely,
Jason Coleman
Bentley Systems, Inc.
Radu
Posts: 5217

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Mon Aug 22, 2016 11:33 am

Hi Jason,

I will add an issue for your request of generating a report from the Diff Directories tool. But I'm not sure when it will be analyzed, we do not have short/medium term plans for this.
About the way in which our script behaves, you can edit the diffDirs.bat and see what it contains, maybe make changes if you can get it to work the way you want.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
super-structure
Posts: 2

Re: Diff Files and Dirs: Enable to run these tasks also from command line

Mon Aug 22, 2016 5:57 pm

Thanks, Radu. I'll investigate using a copy of the diffDirs.bat file.

-Jason

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 5 guests