Merge multiple files

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
21 posts Page 2 of 3
Contributors
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Merge multiple files
comathi
Here's what I came up with... it works with 10 lines of text in each file... now let's see if it can handle 10 million :lol:


This file is hosted off-site.
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Merge multiple files
clanc789
It works! I already cleared up not needed lines so the 14 million decreased to 11 million. My 8 million was already cleared up so now I have 19 million in 1 list :D I'm so happy :D

Since I had a lot of lists to add, there might/are some double/triple/etc entries. Anyone knows how to search for them and replace them with a blank line/just delete that whole line, besides manually?
Practice makes perfect!

VIP since: 6-10-2011
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Merge multiple files
comathi
Here you go. I cooked up another quick little application for you... I hope you like the names so far :lol:


This file is hosted off-site.
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Merge multiple files
clanc789
Running it now, it'll be checking 19 million lines and I am timing it, so I'll give you the results ASAP :D

A big and huge thanks already!

Also, notepad++ was working ~4 hours to put the list in alphabetical order and then just crashed. Anyone got a piece of code to do that/link so I can make a program for it?
Practice makes perfect!

VIP since: 6-10-2011
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Merge multiple files
comathi
I'll see what I can do about that after lunch. It'll be a bit more complicated than the other two, but this is where my classes on recursive algorithms will come in handy :)
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Merge multiple files
clanc789
'lunch' is weird to read lol, its 17:59 here (Holland) xD Have a good meal :)
Practice makes perfect!

VIP since: 6-10-2011
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Merge multiple files
comathi
Well it was 11:59 here in eastern Canada lol

Anyway, turns out VB.NET had built in functions for sorting arrays, so this took way less time than I thought it would.

Introducing the newest member of Comathi's custom line of dictionary tools :lol:


This file is hosted off-site.
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Merge multiple files
clanc789
My PC restarted due to updates or something, will run both programs tomorrow! Thanks already! :D
Practice makes perfect!

VIP since: 6-10-2011
User avatar
clanc789
Coding Guru
Coding Guru
Posts: 786
Joined: Tue Nov 02, 2010 4:45 pm

Re: Merge multiple files
clanc789
The program is running 14 hours now, and no sign of the 'complete' message. Lets hope it comes soon xD (I'm talking about Unify). I took a wild guess and thought that every line would be scanned to search for a duplicate version, resulting in 19.000.000^2 = 361.000.000.000.000 'checks'. Estimating that my PC does ~20.000 entries each second that would take 204 days to complete.

So I guess that I'll leave the double versions within the file xD
Practice makes perfect!

VIP since: 6-10-2011
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Merge multiple files
comathi
The processing time required to check one element gets bigger exponentially as more items are added to the array it needs to check every time.

I don't think it'll be 204 days, but expect it to take quite some time ;)
21 posts Page 2 of 3
Return to “Coding Help & Support”