Windows Command-Line Interface (CLI)

CompleteFTP provides a command-line interface (CLI) that allows you to manage the server configuration directly from the Windows command prompt or PowerShell. The CLI uses a subcommand style similar to git and openssl.

Enabling the CLI

The CLI is not enabled by default on Windows. To enable it, you must add the --enable-admin-cli argument to the CompleteFTP Windows service's binary path.

To modify the service binary path:

  1. Open an Administrator Command Prompt (right-click Command Prompt and select "Run as administrator")
  2. Run the following command to view the current service configuration:
    sc qc CompleteFTP
  3. Note the current BINARY_PATH_NAME value
  4. Run the following command to add the CLI argument (adjust the path if your installation directory differs):
    sc config CompleteFTP binpath= "\"C:\Program Files\Complete FTP\server\CompleteFTPService.exe\" --enable-admin-cli"

    Note: There must be a space after binpath=

  5. Restart the CompleteFTP service for the change to take effect:
    sc stop CompleteFTP
    sc start CompleteFTP

    Or use the Services management console (services.msc)

Using the CLI

Once enabled, commands can be invoked via the CompleteFTP executable:

"C:\Program Files\Complete FTP\server\completeftp.exe" [command] [arguments]

For easier access, you can add the CompleteFTP server directory to your system PATH:

  1. Open System Properties > Advanced > Environment Variables
  2. Under "System variables", select Path and click Edit
  3. Add C:\Program Files\Complete FTP\server to the list
  4. Click OK to save

After adding to PATH, you can simply use:

completeftp [command] [arguments]

Getting Help

Help is available for all commands via the -h option. To see all available top-level commands:

completeftp -h

Most commands have subcommands. Help for these is also available via -h:

completeftp site -h
completeftp user -h
completeftp folder -h

Top-Level Commands

The CLI provides access to CompleteFTP's entire configuration through a Configuration Object Model (COM). The main command categories are:

Common Operations

Viewing Properties

Properties can be viewed using the show subcommand:

completeftp site show default
completeftp user show fred
completeftp folder show /Home

Setting Properties

Properties can be set using the set subcommand with property=value syntax:

completeftp user set fred sftpEnabled=true
completeftp user set fred "fullName=Fred Singh"

For sensitive values like passwords, omit the value to enter it interactively:

completeftp user set fred password

Adding and Removing

Use add and remove subcommands to create or delete items:

completeftp user add newuser
completeftp user remove olduser
completeftp folder add /NewFolder --mapping "C:\Data\NewFolder"

Listing Items

Use the list subcommand to see available items:

completeftp user list
completeftp site list
completeftp folder list /

Interactive Object Viewer

The -v (or --view) option opens an interactive tree viewer for exploring the configuration structure:

completeftp site show -v
completeftp user show fred -v

The viewer supports navigation using arrow keys, page keys, and mouse.

CLI Reference

For complete documentation of all CLI commands and their options, see here or use the -h option on any command. The CLI provides comprehensive built-in help for every command and subcommand.