Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Compare TEXT files


  • Please log in to reply
4 replies to this topic

#1 D_deridex

D_deridex

  • Members
  • 3 posts
  • OFFLINE
  •  

Posted 21 July 2016 - 07:24 AM

Hi guys,

 

Im wondering if there is a way I can have two text files with data, compare the files and have a piece of software remove the data from one that the other has got.

So say file 1 has 50 items and file 2 has 100 but file 2 has 50 items that file 1 has, I want to be able to remove the 50 items from file 2 that file has.

Now I could do it manually, by comparing visually but if I have much much larger files in the furture that would take a silly amount of time.

Essentially a difference 'engine' I could create a macro in access but I was wondering how easy would it be to create a stand alone program that would do that?

 

Richard



BC AdBot (Login to Remove)

 


#2 JohnC_21

JohnC_21

  • Members
  • 24,416 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:52 AM

Posted 21 July 2016 - 08:08 AM

I think you may be able to do this with PowerShell. I would try asking your question on a PowerShell forum here or here.

 

Here is a page showing a possible solution. You may be able to output the difference to another file but I am not sure.

 

https://blogs.technet.microsoft.com/heyscriptingguy/2015/04/01/use-powershell-to-compare-two-files/



#3 Stancestans

Stancestans

  • Members
  • 68 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:52 PM

Posted 21 July 2016 - 08:34 AM

WinMerge could be exactly what you need. Take a tour here http://tour.winmerge.org/ and download it from http://winmerge.org/



#4 D_deridex

D_deridex
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  

Posted 21 July 2016 - 03:03 PM

WinMerge could be exactly what you need. Take a tour here http://tour.winmerge.org/ and download it from http://winmerge.org/

Thanks EXACTLY  what I needed and thanks JohnC_21 for the suggestion.



#5 GoofProg

GoofProg

  • Banned
  • 224 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:52 AM

Posted 25 May 2017 - 11:59 AM

The old way is to use md5 checksums on text and they are different then you can manipulate the files.

It seems you want to see if there is appended data and trim off the data so it is unique.

(I think it is a great C/C++ project.)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users