locked
How do I include tags in a file attribute RRS feed

  • Question

  • When you save a file, you can assign file attributes to it or include tags in it. How do I do this with a filename?
    Tuesday, September 13, 2016 9:09 PM

Answers

  • I looked at the page but it doesn't show me what I need. I want to include the bottom part of the save file dialog box in my dialog, How do I do this?

    Save File Attributes

    I don't believe all file formats support tags. Also there are probably more exceptions than the two listed below.

    Managing Files and Folders in Windows 8

    Quoted from link;

    "You can add or modify properties for most files. However, there are some exceptions, such as plain text (.txt) or rich text format (.rtf) files."


    La vida loca


    Tuesday, September 13, 2016 10:02 PM
  • I looked at the page but it doesn't show me what I need. I want to include the bottom part of the save file dialog box in my dialog, How do I do this?

    These are not file attributes. The information that you mention is maintained in two different ways.  One applies to specific file types, such as certain types of images, and is embedded in the file information.  That is, the file consists of the image itself plus information about the image.  Another example is a WORD document - the file contains the text of the document plus information about the author etc.  Each of those file types has its own way of recording and updating that information.  The dialog you have shown is an example.

    The second way of maintaining that information is to create a database of filenames and store the information related to that filename in the database.  Obviously this has a problem that the data does not move with the file - for instance to a different machine or (in most cases) to a different location on the same machine.  Some of these applications use the embedded file information where available.   It is possible to write a VB .Net application that maintains this information, and which regularly scans nominated directories to ensure that the information is up to date, but it is not a trivial task. 

    Some file systems allow each file to have a companion file system entry that maintains additional information about the file, but creating and using that entry is beyond the capability of VB .Net.

    If you want to access and update the information that is stored in a specific file type then you should indicate what type you want to handle.   If you want to write a generic file information database application you could start with any of the database examples and define your required data structure.

    Tuesday, September 13, 2016 10:52 PM

All replies

  • When you save a file, you can assign file attributes to it or include tags in it. How do I do this with a filename?

    Do you mean "How do I set the attributes of a file"? See:
    https://msdn.microsoft.com/en-us/library/system.io.file.setattributes%28v=vs.110%29.aspx

    • Proposed as answer by Frank L. Smith Tuesday, September 13, 2016 9:29 PM
    Tuesday, September 13, 2016 9:27 PM
  • I looked at the page but it doesn't show me what I need. I want to include the bottom part of the save file dialog box in my dialog, How do I do this?

    Save File Attributes

    Tuesday, September 13, 2016 9:56 PM
  • I looked at the page but it doesn't show me what I need. I want to include the bottom part of the save file dialog box in my dialog, How do I do this?

    Save File Attributes

    I don't believe all file formats support tags. Also there are probably more exceptions than the two listed below.

    Managing Files and Folders in Windows 8

    Quoted from link;

    "You can add or modify properties for most files. However, there are some exceptions, such as plain text (.txt) or rich text format (.rtf) files."


    La vida loca


    Tuesday, September 13, 2016 10:02 PM
  • This program - Tag Spaces - allows "Easy File Tagging" however only these file types are supported Tag Spaces - Supported File Types. How they do that you would need to find out there as it is open source I believe.

    La vida loca

    Tuesday, September 13, 2016 10:11 PM
  • I looked at the page but it doesn't show me what I need. I want to include the bottom part of the save file dialog box in my dialog, How do I do this?

    These are not file attributes. The information that you mention is maintained in two different ways.  One applies to specific file types, such as certain types of images, and is embedded in the file information.  That is, the file consists of the image itself plus information about the image.  Another example is a WORD document - the file contains the text of the document plus information about the author etc.  Each of those file types has its own way of recording and updating that information.  The dialog you have shown is an example.

    The second way of maintaining that information is to create a database of filenames and store the information related to that filename in the database.  Obviously this has a problem that the data does not move with the file - for instance to a different machine or (in most cases) to a different location on the same machine.  Some of these applications use the embedded file information where available.   It is possible to write a VB .Net application that maintains this information, and which regularly scans nominated directories to ensure that the information is up to date, but it is not a trivial task. 

    Some file systems allow each file to have a companion file system entry that maintains additional information about the file, but creating and using that entry is beyond the capability of VB .Net.

    If you want to access and update the information that is stored in a specific file type then you should indicate what type you want to handle.   If you want to write a generic file information database application you could start with any of the database examples and define your required data structure.

    Tuesday, September 13, 2016 10:52 PM