How to Identify a unique file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LeoVBNET
    New Member
    • Apr 2013
    • 29

    How to Identify a unique file

    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?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You could store it in the extended file properties.

    Comment

    • LeoVBNET
      New Member
      • Apr 2013
      • 29

      #3
      Thanks Rabbit, but you have any idea on how it could be done? (shell32 or so?)

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        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.

        Comment

        • LeoVBNET
          New Member
          • Apr 2013
          • 29

          #5
          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.

          Comment

          Working...