[closed my old post since it it has insufficient explanation]
Hi everyone,
I have a program which generates a string for the file entered.
(The length of the string will be equal irrespective of the file size)Here the path of he file is to be entered specifically for generating the string.
And I have to give the path of the second file to compare those two files and thereby declaring those two files are same.
Now, I have defined the string value for the second file in my program and I want the get the string values of all files present in the computer so that I find the presence of file in the system.
"FindFirstFile" function is is used for searching the whole computer by the name of the files but I want to search the file by its string value generated by my program.
how can I achieve this? Can you suggest any ways, methods, functions,links, etc.,
Thank you in advance.
[Update]
Here is a brief explanation of my problem:
My program will generate a string e.g "7CBBAC403976BABF7DBBC005EF201A6C1DB3DF48" for the file entered. The string value does not depend on file name, extension etc.,
But when the contents of the file is modified the output will be modified.
So here is were I have been struck:
My program will check the string value for the two files and check whether those to files are same.
Here I have to enter the location of two files specifically for confirmation. But I have defined the string value of one file in my code
like string a =7CBBAC403976BABF7DBBC005EF201A6C1DB3DF48;
and I have to make my program to get the string value for each and every files of the computer on which my executable runs and find the string which matches the string a.
Just do it the same way you generated the string for the first one - am I missing something?
If you are stuck for a way of generating the string in the first place, try something like a checksum or crc that will generate a unique value based on the file contents
you could invoke any number of shell utilities from within your code (md5sum, crc32, etc.) or just implement your own.