Jump to content

Recommended Posts

Posted

I was hoping someone could help me i have two LARGE files each is a list of about 10000 blacklisted sites. I want to combine this list but i don't want to make duplicate entries. Is it possible to compare each list in an autoit script and have it pull out the duplicate entries? or is there an easier way to remove them?

[size="1"]Please stop confusing "how to" with "how do"[/size]

Posted

Somewhere along the lines of

$line=1
Do
$file1 = FileReadLine("file1.txt",$line)
$file2 = FileReadLine("file2.txt",$line)
$line = $line + 1
If $file1 = $file2 Then
FileWriteLine("NewFile.txt",$file1)
Else
FileWriteLine("NewFile.txt",$file1)
FileWriteLine("NewFile.txt",$file2)
EndIf
Until <===Some State Here

Then you can choose to delete the first 2 files..

havent tested that yet, but its something along those lines

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Posted (edited)

That wouldn't work because its only comparing the same line with each text file and both text files aren't in the same order.

Also i just found out there are comments in the second file. They look like this: [some comment here]. How would i mass remove the comments?

Edited by Deltaforce229

[size="1"]Please stop confusing "how to" with "how do"[/size]

Posted

JdeB you rule!

*bows before the almighty JdeB*

[size="1"]Please stop confusing "how to" with "how do"[/size]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...