Click here to Skip to main content
15,885,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HowTo simulate a 'dumb' terminal in 95/98/ME/NT/2K/XP Pin
HENDRIK R3-Feb-03 0:25
HENDRIK R3-Feb-03 0:25 
GeneralRe: HowTo simulate a 'dumb' terminal in 95/98/ME/NT/2K/XP Pin
HENDRIK R2-Feb-03 23:27
HENDRIK R2-Feb-03 23:27 
Generali don't get it anymore Pin
willempipi2-Feb-03 22:43
willempipi2-Feb-03 22:43 
GeneralRe: i don't get it anymore Pin
willempipi2-Feb-03 23:03
willempipi2-Feb-03 23:03 
GeneralRe: Fast List Control Pin
Mike Nordell2-Feb-03 22:39
Mike Nordell2-Feb-03 22:39 
Generalsockets and proxy Pin
Rüpel2-Feb-03 20:34
Rüpel2-Feb-03 20:34 
GeneralRe: sockets and proxy Pin
palbano3-Feb-03 7:29
palbano3-Feb-03 7:29 
GeneralSorting files by its fingerprints Pin
Stephan Poirier2-Feb-03 20:28
Stephan Poirier2-Feb-03 20:28 
Hi there! Big Grin | :-D
Recently, I've noticed something that should interest you.

On one of my hard drive, I have a folder where I put all the junk I download from Internet. There is much more than 500 files in there. This is because I download from WinMX and others file-sharing software like others do...

What sucks with this kind of software is that you need to download so many files to be able to get a correct one. And the result, your disk are full of junk that you share with others... Dead | X|

So, you have a lots of files of different names and extensions that contains almost the same thing. (It could be jpg, gif, mp3, wav, mov, avi, asf... doesn't matter.)
You need to retrieve just what's good and delete everything that is partially downloaded or everything that is not what you were looking for. (ie : you were looking for a PetShop Boys picture, you have downloaded "boys_live.jpg" and retrieved a WTF | :WTF: BackStreet Boys pic... )

I already tried to sort and delete using explorer. Arrrrgghhhh!!!! It tooks me hour and hour !!! So I gave up! Smile | :)

But like every programmers, I think that, when something is hard to do manually or when it takes ages to do it manually on a computer, you should program the computer to do it at your place. The first computer was exactly invented for that.

What I thought is to scan my folder and look for every file within this folder. During the scan I do a sort of pre-sorting with the first 128 bytes of each file, it should be sufficiant to compare jpg from mp3, mov... I verify every first 128 bytes of each files, put each filename and its first 128 bytes on an resizable array called CURRENT. Notice that if a file contains 0 bytes, it should be deleted immeditaly.

After, the first 128 bytes block of each files are compared one to eachothers in an iteration. Everytime a new match is did, a new array group is created containing the 128 bytes block fingerprint, and all files matching this fingerprint will be added to this group. When done, the program will have created muliple groups containing filenames of 'matching' files.

Now it will have to scan completly each file fingerprint within each group. Some files may be incomplete too. It should be long and complicated I think. I don't know if I have to work with checksums, scan and compare each byte of the file ... It could be long if we have 12 files of 8M to compare bytes to bytes! (What it seems to appear frequently !) Again, everytime a new match is did, a new array group is created and all files matching this fingerprint will be added to this group. We end with with a table that is sorted from a totalt match to a partially match.

The result expected is to show to the user what is on its HDD and let him do the final decision with the scanned files. In a column, files that are OK, without error...
In the other one, a treeview showing each groups found with filenames associated. Filenames with the higher bytes size must be on top under each node, other files will show a percentage of the highest one. Filename with "_incomplete_" should be marked too. User will be able do delete files by right clicking on each first nodes and selecting delete. It should be able to rename, move and view file too. Simple... Unsure | :~

I don't know if this kind of program exist or if someone has coded something like that. I didn't start yet, it's just an idea. But I will work on soon...

If you have any suggestions, idea, infos... Big Grin | :-D
Or if you think I should jump off from a bridge... Laugh | :laugh:

Leave me your impression!

Sorry for my bad english.

Boolean Tatoo

Progamming looks like taking drugs...
I think I did an overdose.
Boolean Tatoo
GeneralRe: Sorting files by its fingerprints Pin
Stephan Poirier9-Feb-03 18:31
Stephan Poirier9-Feb-03 18:31 
GeneralUnique Hardware Key Pin
Mahesh Varma2-Feb-03 19:11
Mahesh Varma2-Feb-03 19:11 
GeneralRe: Unique Hardware Key Pin
jhwurmbach2-Feb-03 22:20
jhwurmbach2-Feb-03 22:20 
GeneralRe: Unique Hardware Key Pin
jhwurmbach2-Feb-03 23:18
jhwurmbach2-Feb-03 23:18 
GeneralRe: Unique Hardware Key Pin
Mike Nordell2-Feb-03 22:57
Mike Nordell2-Feb-03 22:57 
GeneralClass wizard problem Pin
stv2-Feb-03 17:39
stv2-Feb-03 17:39 
GeneralRe: Class wizard problem Pin
Stephan Poirier2-Feb-03 20:39
Stephan Poirier2-Feb-03 20:39 
GeneralRe: Class wizard problem Pin
Obliterator5-Feb-03 9:51
Obliterator5-Feb-03 9:51 
GeneralRe: Class wizard problem Pin
stv6-Feb-03 4:15
stv6-Feb-03 4:15 
Generalfloat Root(float x, float y) Pin
The_Server2-Feb-03 17:02
The_Server2-Feb-03 17:02 
GeneralRe: float Root(float x, float y) Pin
Colin Urquhart2-Feb-03 17:17
Colin Urquhart2-Feb-03 17:17 
GeneralRe: float Root(float x, float y) Pin
The_Server2-Feb-03 17:41
The_Server2-Feb-03 17:41 
GeneralRe: float Root(float x, float y) Pin
The_Server2-Feb-03 18:12
The_Server2-Feb-03 18:12 
GeneralRe: float Root(float x, float y) Pin
The_Server2-Feb-03 18:40
The_Server2-Feb-03 18:40 
GeneralCRecordset and SQL problem Pin
Stefan Dahlin2-Feb-03 14:44
Stefan Dahlin2-Feb-03 14:44 
GeneralRe: CRecordset and SQL problem Pin
Stefan Dahlin2-Feb-03 14:57
Stefan Dahlin2-Feb-03 14:57 
GeneralXP Compatibility Mode Pin
Dov Sherman2-Feb-03 12:58
Dov Sherman2-Feb-03 12:58 

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.