Click here to Skip to main content
15,894,540 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Listbox Values in Pin
Steven J Jowett5-Apr-10 21:46
Steven J Jowett5-Apr-10 21:46 
GeneralRe: Listbox Values in Pin
Anubhava Dimri5-Apr-10 22:00
Anubhava Dimri5-Apr-10 22:00 
GeneralRe: Listbox Values in Pin
Eddy Vluggen5-Apr-10 22:10
professionalEddy Vluggen5-Apr-10 22:10 
QuestionFlickers Pin
Anubhava Dimri5-Apr-10 20:08
Anubhava Dimri5-Apr-10 20:08 
AnswerRe: Flickers Pin
Dave Kreskowiak6-Apr-10 1:43
mveDave Kreskowiak6-Apr-10 1:43 
Questionweb bot Pin
mabrahao5-Apr-10 4:47
mabrahao5-Apr-10 4:47 
AnswerRe: web bot [modified] Pin
mabrahao5-Apr-10 7:23
mabrahao5-Apr-10 7:23 
Questioncompare files with hash tables, find dupe files in folder, manage hash table Pin
NikWing5-Apr-10 3:41
NikWing5-Apr-10 3:41 
Hello all Smile | :)

I wrote all of this stuff here Duplicate Files Finder[^] before I just saw that here are message boards and my questions aren't really much related to the Duplicate File Finder project.

Duplicate File Finder is a nice fast program and partly doing what I want to be done.
But I'm browsing the www for a few days now, trying to find a solution for my problem.
My current selfmade "solution" works, but as you will see, it's kinda simple and uncomfortable.
So maybe someone can help or give hints, that would really be appreciated.

I want to do this:

I have a folder with pictures I want to keep (that folder has different sub folders).
So I found hashdeep and use it to hash the files in the keep folder + subfolders and let it save the hashes in a txt file (hashes keep.txt). I use a batch file for that, the content changes so I have to re-hash after some time. Each line looks like this:

filesize,md5hash,sha-256hash,filename

Next I have a folder full of new pictures.
When I sort them, I sort out pictures I don't want to see again. So I use hashdeep to make another txt file database with hashes/files I don't want to see anymore when sorting files.

Then, everytime I get new pictures I use hashdeep to compare the new files with the 2 hash tables (using a batch file). It creates a text file containing the (full) file names of the found duplicate files in the new pictures folder. After that I use a batch file to open that text file and line by line delete each file listed in it, then delete the text file.

After that the new pics folder might still contain duplicate files. So I found HashMyFiles. It's kinda slow compared to eRRaTuM's Duplicated Files Finder and it processes all files without ignoring the files that exist only once in the new pics folder.
I use it to check the previously "cleaned" new pictures folder for double files. HashMyFiles gives each group of duplicate/multiple files an index and lets you sort by it. So I select all entries (except 1) of each group by hand and delete them.

After this the new pics folder contains only different files I might want to keep and files I don't yet have in my hash table file.
After sorting these pictures, I create new hashes of the new unwanted files with hashdeep and save to a new text file. I use a batch file to remove the 4 or 5 hashdeep info lines at the beginning of the file (creating a temp file, skipping the 1st lines, adding the new hash text file line by line to the temp file) and then add it (copy /B a + b ab) to the current hash table file after making a backup copy of it first.

And this game starts anew when I get new pictures.

So then I found eRRaTuM's program here on code project. It worked quite good, but for some reason I can't use it anymore after 1 day because I get a System.IO.FileNotFoundException when I want to process a folder. I don't know what causes this. It also would be just a better/faster replacement for HashMyFiles.


Sadly I don't know C# or C++, all I know is a little bit of VB.net. I just wrote me an image viewing/sorting program in VB.net, it works like I want it to, but I never learned how to code/script, so I'm kinda looking at other code like a sheep ;D

Is it possible to find an easy solution for all of this and maybe "import" the existing hashdeep hashtable files? I guess all I need might be the filesize (if needed for quicker comparison?) and the sha-256 hash, filename and md5 hash should be obsolete IMO.

Here again the options I want to achieve in a single program:

- compare files in a folder with informations in 2 hash databases, being able to list and delete found files with same hash in these databases
- look for duplicate files in a folder and list these found duplicate files, select all except one of each group (like Duplicate Files Finder does) and then delete them
- hash new files from a folder (the ones I don't want to see again after sorting) and add them to existing hash database

and maybe
- check existing hash database for double entries (which shouldn't be there though, but it wouldn't be bad to have such an option)

the more files I have in the new pictures folder and the more hashes in the database, the slower hashdeep becomes. I don't know if it's easy possible to make the new program use more threads/cores but that would speed things up I guess.

While looking for a solution I found code snippets and how to md5-hash files (I'd like hash-256 though since I already have these hashes and it means less collisions) but I have no idea how to get all of this done Frown | :( It's like a puzzle for me, snippets and no idea how to combine them.

Thanks for any advice/hint/place to look/other place to ask for help!

Nik
AnswerRe: compare files with hash tables, find dupe files in folder, manage hash table Pin
Paramu19735-Apr-10 20:21
Paramu19735-Apr-10 20:21 
GeneralRe: compare files with hash tables, find dupe files in folder, manage hash table Pin
NikWing6-Apr-10 2:00
NikWing6-Apr-10 2:00 
GeneralRe: compare files with hash tables, find dupe files in folder, manage hash table [modified] Pin
NikWing6-Apr-10 2:21
NikWing6-Apr-10 2:21 
AnswerRe: compare files with hash tables, find dupe files in folder, manage hash table Pin
NikWing6-Apr-10 13:02
NikWing6-Apr-10 13:02 
QuestionVb.net & SQLite Pin
Ben Magee5-Apr-10 3:25
Ben Magee5-Apr-10 3:25 
AnswerRe: Vb.net & SQLite Pin
Sebastian Br.5-Apr-10 21:18
Sebastian Br.5-Apr-10 21:18 
QuestionRecursive Function [modified] Pin
Andy_L_J4-Apr-10 16:51
Andy_L_J4-Apr-10 16:51 
AnswerRe: Recursive Function Pin
riced4-Apr-10 23:41
riced4-Apr-10 23:41 
GeneralRe: Recursive Function Pin
Andy_L_J5-Apr-10 2:35
Andy_L_J5-Apr-10 2:35 
GeneralRe: Recursive Function [modified] Pin
riced5-Apr-10 4:19
riced5-Apr-10 4:19 
AnswerRe: Recursive Function Pin
William Winner7-Apr-10 8:18
William Winner7-Apr-10 8:18 
QuestionGet the parent objet or parent level in nested lists Pin
norrisMiou4-Apr-10 0:51
norrisMiou4-Apr-10 0:51 
AnswerRe: Get the parent objet or parent level in nested lists Pin
DaveAuld4-Apr-10 2:28
professionalDaveAuld4-Apr-10 2:28 
GeneralRe: Get the parent objet or parent level in nested lists Pin
norrisMiou4-Apr-10 2:56
norrisMiou4-Apr-10 2:56 
GeneralRe: Get the parent objet or parent level in nested lists Pin
DaveAuld4-Apr-10 5:36
professionalDaveAuld4-Apr-10 5:36 
AnswerRe: Get the parent objet or parent level in nested lists Pin
Alan N4-Apr-10 6:04
Alan N4-Apr-10 6:04 
GeneralRe: Get the parent objet or parent level in nested lists Pin
norrisMiou5-Apr-10 7:26
norrisMiou5-Apr-10 7:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.