Jump to content
UBot Underground

Delete line of txt from one file that has the same line in another file.


Recommended Posts

Example:

 

File A contains

 

1

2

3

4

5

6

7

8

9

 

File B contains

 

3

5

6

 

Id want to delete 3,5 and 6 from file A.

 

How can i do this?

 

I did read a post here that said to Combine files and deleting duplicates, that would just leave me back to square one, unless im missing something.

Link to post
Share on other sites

You can use the "Subtract Lists" function to this.

 

Here, this is what I mean:

clear list(%List A)
clear list(%List 
clear list(%New List)
add list to list(%List A, $list from text("1,2,3,4,5,6,7,8,9", ","), "Delete", "Global")
add list to list(%List B, $list from text("3,5,6", ","), "Delete", "Global")
add list to list(%New List, $subtract lists(%List A, %List , "Delete", "Global")

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...