Command Line Interface (CLI) App

The Files.com Command Line Interface (CLI) App is a great option for scripted or automated transfers between a local machine and Files.com.

Because it works through the standard Command Line, the CLI app is easy to script from a variety of environments without having to use our SDKs. With that said, if you are already using a programming language where we offer an SDK, the SDK may offer a higher level of integration for your application.

The CLI App is cross-platform (Windows/macOS/Linux) and supports fast, concurrent file transfers.

Downloading and Installing

Click here to download the CLI App.

On that page, you'll need to pick your exact operating system to download the correct version.

No installation is necessary. The app is a self contained app which can be stored anywhere on your computer.

Support For All Operations, Not Just File Operations

Of course the CLI supports File Operations including list, download, upload, move, rename, delete, etc. But equally important is that it supports operations on every resource available in Files.com including Users, Permissions, Groups, Remote Servers, Behaviors, etc.

Example code for how to use the CLI with any resource can be found in the Files.com Developer Documentation. Click CLI in the top right to enable CLI example code.

Sending Operation/Run Logs to the Cloud

If you are running scripted operations, you can have the CLI send a report of the operation including the Success/Failure status as well as a log of every run. To do this add the flag --send-logs-to-cloud.

The operation logs will be made available in the web interface at Settings > Logs > External logs.

Syncing Files

To facilitate file-syncing workflows, the --sync flag can be used with the upload or download command to specify that only new files be transferred.

This sync uses rules very similar to Files.com's Remote Server sync feature, using only filename and size to determine whether a file needs to be synced. It does not currently use information such as modified date or checksum for this purpose. Due to the wide variety of remote server types supported (and our plans to support hundreds more via an open integration platform coming soon), this is the only methodology we've been able to design that works 100% consistently across all files on Files.com, including files that may potentially be stored on a remote server.

Here is a "push" (upload) example for syncing files from a local Documents folder to a Files.com folder of the same name:

files-cli upload Documents Documents --sync --send-logs-to-cloud

Here is a "pull" (download) example for syncing files to a local Documents folder from a Files.com folder of the same name:

files-cli download Documents Documents --sync --send-logs-to-cloud

Detecting and Handling Errors

If an error occurs during an operation, the CLI app will exit with a non-zero status and then output JSON format of the error to STDOUT. You can use this in scripts to detect certain errors and respond accordingly.

Get Instant Access to Files.com and Start Collaborating and Automating

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, fill out the short form on the next page, get your account activated instantly, and start setting up your Files and Workflows immediately.

Start My Free Trial