Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Is there a way to retrieve a unique ID from a set of files regardless of changes to size and name in c#

I was thinking I could use something like

string UniqueFileName = oFileInfo.GetHashCode().ToString();

the issue with this is that after a specific amount of time those values appear to change. just curious if anyone has any libraries or anything I can look into.

Here is what I am trying to do. have a user place a file in a specified directory. log that the file was added and then track the file for a period of time. now everytime an item is added I need to verify the file doesnt already exist. and if it has already been deleted. if it has I want to delete the file but there is no way to prevent duplicate names inside of a database without excessive restrictions on the application. Thanks for the help.

Comments