Store GUID as file/folder property

  • Thread starter Thread starter Bryan Lynn
  • Start date Start date
B

Bryan Lynn

Is there any way to store a GUID value as a property on a file/folder?

When my app creates new files/folders, I'd like to store a GUID as a
custom property on the file/folder. This way, when the user physically
moves the file/folder using Windows Explorer (and not using my app), I
can use this GUID to detect which files/folders were moved and my app
can internally re-map some things.

Any thoughts?
 
Do you have NTFS? IF yes, NTFS supports alternative datastreams (ADS) which
means that you can attach metadata to any file on your system.
The only problem is that it does not work under FAT32.

Alternatively, provided that nobody changes the files unnotified from your
program you can use a hashtable which saves filesize and CRC value
(hashcode) of the files so you can later recognize the files even if they
were renamed. This only works if the files are not modified (exception from
within your program).

hope that helps.
 
Back
Top