btaguy.blogg.se

Xyplorer compare directories
Xyplorer compare directories







xyplorer compare directories

Close Set objDoc1 = nothing Set objDoc2 = nothing 'Display WScript. CompareDocuments ( objDoc1, objDoc2 ) 'Now close the original docs WScript. Echo "Running comparison." Set objWordComp = objWord.

xyplorer compare directories

Item ( 1 ),, true ) ' Compare the documents WScript. Echo "Retrieving second document." Set objDoc2 = objword. Echo "Retrieving first document." Set objDoc1 = objword. CreateObject ( "Word.Application", "objword_" ) 'When run from the command line we have to open the documents before we can compare them as we have to reference the objects not the paths WScript. Echo "Initialising." Dim objWord, objWordComp, objDoc1, objDoc2 Set objWord = WScript. Echo "Sorry, for the compare to work you must pass in two Word document file paths." WScript.

xyplorer compare directories

Option Explicit 'Check we have a couple of parameters If WScript. Therefore, it is essential that you have dual pane browsing enabled and a single file selected in each pane. These correspond to the path to the selected file in the active pane and the path to the selected file in the inactive pane. I’m only currently using this script from XYplorer, so it made sense to store it there rather than in my central VBScript directory structure. The script runs a cscript command to run a VBScript called wordcmpr.vbs, located in the same scripts directory as my xyplorer script files. To date, the combination of how frequently I use the feature and how often I get the selection wrong (never so far) hasn’t necessitated me adding any additional checks. It simply assumes that you have a couple of Word documents selected. It is just a one-liner and contains no vaidation or error handling. I have this script assigned to a menu item on my Office File Tools button in XYplorer. That second part is unsurprisingly a VBScript, as VBScript has good support for interacting directly with instances of Microsoft Word. The first part if an XYplorer script that gets the file paths for the selected files and then passes that on to the second part. This is all fine and good, but as someone who is usually working with the files directly in XYplorer (my Windows file manager of choice), I figured it was more efficient to trigger it from within the app. Normally, you would opn Word, navigate to each fle in turn and trigger the compare. In these scenarios, we can fall back to Word’s document compare feature to identify the changes. Unfortunately from time to time, people send me document revisions where they have neglected to enable track changes, and it is important to identify what has actually changed. It has to be pueposefully enabled as it can make documents confusing and cumbersome for those who don’t fully understand how to use it. Word of course comes with it’s own built-in version tracking feature, but by default this feature is enabled. A lot of my work revolves around documentation and in business, Microsoft Word documents still rule.









Xyplorer compare directories