# SalQuickFTP

Namespace: **PPJ.Runtime.Windows.QO**

Assembly: **PPJ.Runtime.49** (4.9.0.0)

FTP Control.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SalQuickFTP : SalCustomControl
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SalQuickFTP
    Inherits SalCustomControl
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalQuickFTP()

Default Constructor.

## Properties

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AppName

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): invalid (Default: `""`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FtpClient

[SalFtpClient](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md): Returns the single instance of the FTP client. It is created when it's needed.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Password

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): (Default: `""`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ServerName

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): invalid (Default: `""`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ServerPort

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): invalid (Default: `21`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)UserName

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): invalid (Default: `""`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)WindowsClassName

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): invalid (Default: `""`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)WindowsDLLName

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): invalid (Default: `""`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)WindowsExStyle

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): invalid (Default: `0`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)WindowsStyle

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): invalid (Default: `0`)

## Methods

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CloseFile(hFile)

Closes an open file.

| Parameter | Type                                                                        | Description |
| --------- | --------------------------------------------------------------------------- | ----------- |
| **hFile** | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Connect(sServerName, nServerPort, sUserName, sPassword)

Establish communication with an FTP server under the user and password specified. If the user name is null, the anonymous user is connected.

| Parameter       | Type                                                                        | Description |
| --------------- | --------------------------------------------------------------------------- | ----------- |
| **sServerName** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nServerPort** | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **sUserName**   | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **sPassword**   | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateDirectory(sDirectory)

Creates a directory on the FTP server.

| Parameter      | Type                                                                        | Description |
| -------------- | --------------------------------------------------------------------------- | ----------- |
| **sDirectory** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DeleteFile(sRemoteFile)

Deletes the specified file on the FTP server.

| Parameter       | Type                                                                        | Description |
| --------------- | --------------------------------------------------------------------------- | ----------- |
| **sRemoteFile** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Disconnect()

Disconnects the current connection.

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)EnumDirectories(sSearch, sDirs)

Obtain an array of directory names based on a search path specified.

| Parameter   | Type                                                                                   | Description |
| ----------- | -------------------------------------------------------------------------------------- | ----------- |
| **sSearch** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)            |             |
| **sDirs**   | [SalArray\<SalString>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)EnumFiles(sSearchFile, saFileNames)

| Parameter       | Type                                                                           | Description |
| --------------- | ------------------------------------------------------------------------------ | ----------- |
| **sSearchFile** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)    |             |
| **saFileNames** | [SalArray\`1&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)EnumFilesInfo(sSearchFile, saFileNames, naAttributes, dtaCreationTimes, dtaLastAccessTimes, dtaLastWriteTimes, naFileSizes)

Obtain an array of file names and all related file information based on a search path specified.

| Parameter              | Type                                                                                     | Description |
| ---------------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **sSearchFile**        | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)              |             |
| **saFileNames**        | [SalArray\<SalString>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |
| **naAttributes**       | [SalArray\<SalNumber>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |
| **dtaCreationTimes**   | [SalArray\<SalDateTime>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **dtaLastAccessTimes** | [SalArray\<SalDateTime>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **dtaLastWriteTimes**  | [SalArray\<SalDateTime>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **naFileSizes**        | [SalArray\<SalNumber>](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FindFirstFile(sSearchFile, sFileName)

| Parameter       | Type                                                                         | Description |
| --------------- | ---------------------------------------------------------------------------- | ----------- |
| **sSearchFile** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **sFileName**   | [SalString&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FindFirstFileInfo(sSearchFile, sFileName, nAttributes, dtCreationTime, dtLastAccessTime, dtLastWriteTime, nFileSize)

| Parameter            | Type                                                                           | Description |
| -------------------- | ------------------------------------------------------------------------------ | ----------- |
| **sSearchFile**      | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)    |             |
| **sFileName**        | [SalString&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |
| **nAttributes**      | [SalNumber&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |
| **dtCreationTime**   | [SalDateTime&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **dtLastAccessTime** | [SalDateTime&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **dtLastWriteTime**  | [SalDateTime&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nFileSize**        | [SalNumber&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FindNextFile(sFileName)

| Parameter     | Type                                                                         | Description |
| ------------- | ---------------------------------------------------------------------------- | ----------- |
| **sFileName** | [SalString&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FindNextFileInfo(sFileName, nAttributes, dtCreationTime, dtLastAccessTime, dtLastWriteTime, nFileSize)

| Parameter            | Type                                                                           | Description |
| -------------------- | ------------------------------------------------------------------------------ | ----------- |
| **sFileName**        | [SalString&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |
| **nAttributes**      | [SalNumber&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |
| **dtCreationTime**   | [SalDateTime&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **dtLastAccessTime** | [SalDateTime&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **dtLastWriteTime**  | [SalDateTime&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nFileSize**        | [SalNumber&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)   |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetCurrentDirectory(sDirectory)

| Parameter      | Type                                                                         | Description |
| -------------- | ---------------------------------------------------------------------------- | ----------- |
| **sDirectory** | [SalString&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetFile(sRemoteFile, sLocalFile, bTransferBinary, nContext)

Copies a file from an FTP server to the local machine. If nContext is greater than zero, an asynchronous process is started and status messages are send to the window. The nContext argument uniquely identifies the asynchronous process and is passed into the status messages in wParam.

| Parameter           | Type                                                                         | Description |
| ------------------- | ---------------------------------------------------------------------------- | ----------- |
| **sRemoteFile**     | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **sLocalFile**      | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **bTransferBinary** | [SalBoolean](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nContext**        | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetLastErrorCode()

Returns the code of the last error that was handled by the class.

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetLastErrorMessage()

Returns the message of the last error that was handled by the class.

**Returns:** [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)OpenFile(sRemoteFile, nFlags, bFlags)

Opens a file on an FTP server.

| Parameter       | Type                                                                         | Description |
| --------------- | ---------------------------------------------------------------------------- | ----------- |
| **sRemoteFile** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **nFlags**      | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **bFlags**      | [SalBoolean](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)PutFile(sLocalFile, sRemoteFile, bBinaryTransfer, nContext)

Copies a file from a local machine to an FTP server. If nContext is greater than zero, an asynchronous process is started and status messages are sent to the window. The nContext argument uniquely identifies the asynchronous process and is passed into the status messages through wParam.

| Parameter           | Type                                                                         | Description |
| ------------------- | ---------------------------------------------------------------------------- | ----------- |
| **sLocalFile**      | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **sRemoteFile**     | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **bBinaryTransfer** | [SalBoolean](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nContext**        | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ReadFile(hFile, sBuffer, nBufferSize)

| Parameter       | Type                                                                         | Description |
| --------------- | ---------------------------------------------------------------------------- | ----------- |
| **hFile**       | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |
| **sBuffer**     | [SalString&](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nBufferSize** | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md)  |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)RemoveDirectory(sDirectory)

Delete a specified directory on an FTP server.

| Parameter      | Type                                                                        | Description |
| -------------- | --------------------------------------------------------------------------- | ----------- |
| **sDirectory** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)RenameFile(sOldRemoteFile, sNewRemoteFile)

Rename a file on an FTP server.

| Parameter          | Type                                                                        | Description |
| ------------------ | --------------------------------------------------------------------------- | ----------- |
| **sOldRemoteFile** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **sNewRemoteFile** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetCurrentDirectory(sDirectory)

Changes to a different working directory on an FTP server.

| Parameter      | Type                                                                        | Description |
| -------------- | --------------------------------------------------------------------------- | ----------- |
| **sDirectory** | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)WriteFile(hFile, sBuffer, nBufferSize)

Writes information to an open file on an FTP server.

| Parameter       | Type                                                                        | Description |
| --------------- | --------------------------------------------------------------------------- | ----------- |
| **hFile**       | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **sBuffer**     | [SalString](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |
| **nBufferSize** | [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md).

## Implements

| Name                                                                         | Description                                                                        |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [ISalWindow](/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md) | All Sal windows (Child windows, Forms, Dialogs and MDIs) implement this interface. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desktop-api.iceteagroup.com/ppj.runtime.49/internet/ppj.runtime.windows.qo.salquickftp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
