About Differential Extraction

Asked 1 years ago, Updated 1 years ago, 82 views

There are two files A and B
File A

1,1234,4567,890
2、2345、5678、891
3、3456、6789、891

File B

1,1234,4567,890
3、3456、6789、891

In this case

located in file A
 2, 2345, 5678, 891

Is it possible to extract only and write it to another file?

By the way, there are about 10,000 lines of files.

emeditor

2022-09-29 22:14

1 Answers

Open files A and B in EmEditor, activate files B and A in order (last active file with extraction differences), and run the following macros:Then, extract only the differential line and create a new file.

US>To run a macro, first save the following macros under a filename, such as ExtractDiff.jsee.Then select Select from the Macros menu to select the saved macro.Then, activate File A as shown above, and then select Run from the Macro menu.

 if(editor.Compare(0, "", "", "")==eeDiff){
    editor.ExecuteCommandByID (4323); // Clear all Bookmarks
    editor.ExecuteCommandByID(4593); // Bookmark Changes
    editor.ExecuteCommandByID(4590); // Extract Bookmarked Lines to New File
    editor.ExecuteCommandByID (4497); // Reset Compare mode
}


2022-09-29 22:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.