Remove a file on the server.
Syntax
object.DeleteFile( Filename )
Parameters
- Filename
- A string value which specifies the name of the file to be
deleted.
Return Value
A value of zero is returned if the method succeeds. Otherwise,
a non-zero error code is returned which indicates the cause of the
failure.
Remarks
The DeleteFile method deletes an existing file from the
server. You must have the appropriate permission to delete the
file, or an error will occur.
Example
Private Sub cmdRmFile_Click()
Dim nError As Long
nError = FileTransfer1.DeleteFile(Trim(txtRemoteFile.Text))
If nError > 0 Then
MsgBox "Delete File error: " & nError
End If
End Sub
See Also
RenameFile Method
|