Table Of Contents
 

CF_FileManager Adding File Descriptions

Overview

In a few cases, the ability to add descriptions to files and folders is important for the efficient use of CF_FileManager

Version 3.2 allows you to pass a number of parameters to the component to interface with a database which is used to store and retrieve the descriptions for each file and folder.

To add a description to a file or folder, simply right-click on the file or folder and choose properties. A new text input control is displayed under the name of the object allowing you to enter a description.

Setting Up Descriptions

To use CF_FileManager with descriptions for files and folders, you first need to create a database and a datasource.

Select a database and create the following table:

ffObjectDescriptions [table]
  - ffObjectDescriptionId (autonumber,primary key)
  - ffObjectPath (varchar 255)
  - ffObjectDescription (varchar 255)

You will then need to create a datasource using ColdFusion Administration and set a username and password for the datasource.

e.g: Datasource="www-CFFileManagerDescriptions-MySQL" : Username="dc" password="dc"

You are now ready to pass this information to CF_FileManager.

Sample Code:

To tell CF_FileManager to use File and Folder Descriptions, we simply pass the parameter SHOWDESCRIPTION="YES" along with the following parameters:

  • DESCRIPTIONDATASOURCE   :    The datasource configured above
  • DESCRIPTIONUSERNAME        :    The username for the datasource above
  • DESCRIPTIONPASSWORD        :    The password for the datasource above

<cf_dccom component="dcFileManagerV3"
                folder="c:\sample"
                showDescription="yes"
                descriptionDatasource="www-CFFileManagerDescriptions-MySQL"
                descriptionUsername="dc"
                descriptionPassword="dc"
></cf_dccom>

CF_FileManager takes care of the descriptions once associated with a file or folder. This means if the folder or file is renamed, the description remains associated with the object. Also, CF_FIleManager cleans up the database if the file or folder is deleted or moved.