Session.RemoveFiles Method

Removes one or more remote files.

Syntax

C#
public RemovalOperationResult RemoveFiles(string path)
VB.NET
Public Function RemoveFiles(path As String) As RemovalOperationResult

Parameters

Name Description
string path Full path to remote directory followed by slash and wildcard to select files or subdirectories to remove.

Return Value

RemovalOperationResult. See also Capturing results of operations.

Advertisement

Exceptions

Exception Condition
InvalidOperationException Session is not opened.
SessionLocalException Error communicating with winscp.com.
See the exception documentation for details.
TimeoutException Timeout waiting for winscp.com to respond.

Examples

Real-Life Example

Last modified: by martin