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.
The CLI App uses the Files.com RESTful APIs via the HTTPS protocol (port 443
) to securely communicate and transfer files so, when used interactively or from a script, no firewall changes should be required in order to allow connectivity.
Support For All Operations, Not Just File Operations
The CLI supports all 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.
CLI Prerequisites
The Files.com Command Line (CLI) App is supported on Windows (64-bit), Linux (64-bit), and MacOS (64-bit). It supports both ARM64 and X86-64 (also known as AMD64) system architectures for these operating systems.
Windows
The Files.com Command Line (CLI) App can be used on Windows 10 and higher and Windows Server 2016 and higher.
macOS
The Files.com Command Line (CLI) App can be used on macOS Catalina 10.15 or later.
Linux
The Files.com Command Line (CLI) App can be used on any 64-bit linux distribution with a linux kernel version of 2.6.32 or later.
Downloading and Installing CLI App
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.
We recommend placing the app binary into one of the folders listed in your %PATH%
(Windows) or $PATH
(Linux and Mac).
Authentication and Login
The CLI App will prompt you for your login information or can be used with an API key.
CLI commands must be authenticated and are restricted by the allowed permissions for the user account or API key.
CLI App Help
For help with the CLI App, you can use the --help
option to access more information about how to use the CLI App and its various functions.
For example, to see the list of available commands:
You can access help about a particular command by appending the --help
option to the command. For example, to find out more about the folders command, use:
Listing Folders
To list the contents of a folder in your Files.com account, use the command:
Creating Folders
To create folders, use this command:
Uploading Files and Folders
Use the upload command to upload files and folders to your Files.com site.
Downloading Files and Folders
Use the download command to download files and folders from your Files.com site.
Syncing Files and Folders
Use the sync command to push or pull newer files between a folder in your Files.com site and a folder on your local machine.
Performing Administrator Actions
The CLI App can be used to perform administrator actions.
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.