FileCollection.DeleteFile Method
This method deletes the specified file from disk. It does not remove the file name from the FileCollection, however. (To remove it from the collection, use the Remove method.)
Syntax
void DeleteFile ( int index )
Parameters | Description |
index | The 0-based index of the file name in the collection. |
Example
' This example adds a file to a file collection and then deletes the ' file and removes it from the collection. Dim fc Set fc = Server.CreateObject("HotDocs_Online.FileCollection") fc.Add "c:\inetpub\wwwroot\files\demoempl.docx" fc.DeleteFile fc.Count - 1 fc.Remove fc.Count - 1