Question Add tags to text file.

lance0882

New member
Joined
Nov 30, 2010
Messages
3
Programming Experience
1-3
Hi,

I am wanting to add tags to the properties of a text file. There is no built in method in .net to do this for .txt or .rtf files. Does anyone know of a solution for this?

Thanks for any help you can give!
 
I have a text file that I need to add new tags into the background like the details section does, such as Name, Attributes, Owner... In word docs, and music files it is built in where you can add extra information, however with text files you cannot add tags besides modifying the above built in ones. My boss wants me to create a vb.net program that can check for a certain tag in the details section to know if a file has been moved from one folder on our directory to another to make sure we have the correct program. He does not want me to physically put anything inside the text file so adding a tag is the only way we could think of to get around this.

thanks!
 
I would take a look at IO.File.SetAttributes. Here's an example of making a file ReadOnly.

VB.NET:
Dim attr As FileAttribute = FileAttribute.ReadOnly
IO.File.SetAttributes("C:\Temp\yourfile.txt", attr)
 
Matt,

Thank you for the example. What I am actually trying to accomplish is adding a new attribute or tag. That functionality is not built in to .net and was trying to find out if someone had a custom .net class that would handle this or a shell file to accomplish this.
 
Back
Top