Assigns a file to the object.



outOK = File.SetFile(inPath)


Name   Type   Description
inPath String The path to the file.
Return Boolean Whether the file supports metadata or not.



This function is used to assign a file to the File object. After the SetFile function has been called the object may be used to add new metadata or open existing metadata.

The function returns a Boolean value to indicate if the path specified supports metadata or not. This value is the same as the File Supported property.

You can specify a path to a nonexistent file. When you add your first item of metadata the file will be created.


See Also

File Supported property.



thePath = Server.MapPath("images/boat.jpg")
Set theFile = Server.CreateObject("MetaFiler2.File")
theOK = theFile.SetFile(thePath)
If theOK Then

  Set theData = theFile.Add("title")
  theData.Text = "Picture of a Boat"

End If

The code finds the path to an image file named 'boat.jpg'. If the file supports metadata then some title metadata is added to the file.