Key Value Pairs

Is there a way to store key:value pairs in file of folder properties?

Using scripting, cyou could add it to the files as your own custom NTFS ADS metadata, assuming the files are on a local NTFS drive and won't be archived or copied to something that isn't NTFS (e.g. cloud storage, NAS). Only your own script would know to look for it, so it wouldn't show up in other tools.

It could also be added as generic tags, but you'd have to put the whole key and value into the tag name, which might be messy but could also work in an easier way, depending on what you need the values for.

Or store them in a separate database wherever you want, using scripting.

If I went the generic tag route, would it be terribly complicated using a script to order the tags? I don't know if there is a practical case where that would come up, true.

When you say a separate database, what process are you describing? Am I using a unique name for the folder/file that never changes (like possibly an inode) and adding tags to the database?

Scripts can get a list of tags on a file, and can sort things easily enough.

I'm just describing the concept. It would be entirely up to your code how it worked and how/where the data was stored, if you wanted to use your own external database (which could be a simple text file, or a full-blown database, depending on what you need).

1 Like

I think what you mean is you need something that "follows" the file, some kind of unique identifier that you can relate to even if the file has been moved ... and I think this can be tricky :slight_smile: especially if you want something that can be fast whatever the file (e.g. not a hash).

Yeah that is what I mean, that is the the tricky part as I could find a better way to organize at any time.