By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

How to Identify a unique file

P: 29
Hello.
I'm working on new project. It is a Movies/Series Organizer. The user has any amount of movies, series and covers files in any folders. So I need some how to identify any file from another. I would like to be able to put some ID code inside the file (like in attribute or so), in order to recognize that "unique" file.

I came with the idea of put a code at the end of the file name (ex. "Star Wars Episode IV.#&33.avi") but I'm not glad with it.

Someone has a better idea?
May 21 '13 #1
Share this Question
Share on Google+
4 Replies


Rabbit
Expert Mod 10K+
P: 12,382
You could store it in the extended file properties.
May 21 '13 #2

P: 29
Thanks Rabbit, but you have any idea on how it could be done? (shell32 or so?)
May 22 '13 #3

Rabbit
Expert Mod 10K+
P: 12,382
I've only read the extended file properties and you can do that with the Folder object's GetDetailsOf method. Here is a link to Microsoft's documentation on that.
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx.

I'm sure if you poke around the manual you'll find the function that lets you set it. I don't know it off the top of my head because I've never used it. But it reasons to stand that if you can get them, you can also set them.
May 22 '13 #4

P: 29
Finding information on the web I got the DSOFile assembly. It allows me to read and write extended file properties such as Comments, Category, Author, etc.
What I do is to put an ID inside on one of this properties, and the same time this ID is the "Key" of a Hashtable Collection where I save all the information about that file.
This assembly allows me to work with files even when these files are being used by another app.
Anyway, I gonna look over about GetDetailsOf method you mencioned.
May 23 '13 #5

Post your reply

Sign in to post your reply or Sign up for a free account.