Skip to main content
tclaremont
Inspiring
January 22, 2010
Question

View/Manipulate the Comments property of a file?

  • January 22, 2010
  • 3 replies
  • 716 views

When you view a directory in windows expolorer, or view the properties of a file, one of the properties is called "Comments". If you right click on a file, you can modify the value for this property.

Is there a way that I can manipulate this property using CFFILE?

I am still on CF8 if that makes a difference.

    This topic has been closed for replies.

    3 replies

    Inspiring
    January 24, 2010
    When you view a directory in windows expolorer, or view the properties of a file, one of the properties is called "Comments". If you right click on a file, you can modify the value for this property.

    Is there a way that I can manipulate this property using CFFILE?

    For what file types? I suspect the "how" will vary depending on what file types you are talking about.

    tclaremont
    Inspiring
    January 25, 2010

    It is kind of convoluted, but I want my end users to upload documents into a directory. That same directory needs to be indexed by another server on the network, to present the list of files in that directory to end users of THAT system. That system is ancient, and nobody wants to put forth the effort to upgrade it to the 21st century. As a result it shows the files in the directory in the order indicated by the DateLastModified property, but that is not necessarilly the date of the document itself. It is the date that the document was UPLOADED using my system. I was hoping to be able to populate the Comments property at the time of the upload, so this other system can read that field and present the documents in descending order that way.

    I know this explanation is going to bring up a bunch of "what ifs" but suffice to say they are NOT going to change their system to a database approach regardless of how logical we make it sound. Sorting on the Comments field was my last stab at a compromise.

    Inspiring
    January 23, 2010

    Is this for an MP3 file or something like that?  Metadata like that is stored in the file's ID3 (or similar) tags.

    Ray Camden covers extracting ID3 tags from an MP3 file here:

    http://www.coldfusionjedi.com/index.cfm/2006/6/13/Reading-MP3-ID3-tags-with-ColdFusion

    It'll be a similar approach with other file types & tagging mechanisms.

    --

    Adam

    Owainnorth
    Inspiring
    January 23, 2010

    Almost certainly not using CFFILE, but you may well be able to do it with Java.

    See if you can track down a way of doing it in Java, then use createObject("java") and go from there.

    O.