Skip to main content

Using Multiple Accounts (Profiles)

The Command Line Interface (CLI) App allows you to access multiple Files.com accounts by specifying a different profile for each account.

This is useful when you need to access multiple accounts within a single Files.com site or when you have accounts across multiple Files.com sites, such as a Production site, Test site, and Child site.

To set up profiles for your Files.com accounts, use the following commands:

files-cli config set --subdomain="MYFIRSTCOMPANY" --username="FIRSTUSERNAME" --profile="firstaccount"
files-cli config set --subdomain="MYSECONDCOMPANY" --username="SECONDUSERNAME" --profile="secondaccount"
files-cli config set --endpoint="https://files.mythirdcompany.com" --username="THIRDUSERNAME" --profile="thirdaccount"

To execute commands for a specific account, use the --profile option in your command. For example:

files-cli folders list-for /path/to/folder/in/account1/ --profile="firstaccount"
files-cli folders list-for /path/to/folder/in/account2/ --profile="secondaccount"
files-cli folders list-for /path/to/folder/in/account3/ --profile="thirdaccount"

You can also configure API Keys for profiles:

files-cli config set --api-key="API_KEY_ONE" --profile="firstaccount"
files-cli config set --api-key="API_KEY_TWO" --profile="secondaccount"
files-cli config set --api-key="API_KEY_THREE" --profile="thirdaccount"

If the --profile option is not specified then all configuration and operations will use your default profile setting.

You can view the account profiles that have been configured by using this command:

files-cli config show

Updating Profiles

Profiles can be updated by using the config reset command.

For example, you can update the settings of a named profile using the following command:

files-cli config reset --subdomain="UPDATED_SITE_NAME" --username="UPDATED_USERNAME" --api-key="UPDATED_API_KEY" --profile="firstaccount"

Profile Configuration File

The CLI App stores its configuration within a hidden file on your local system.

The file is located at %HOME%\.config\files-cli on Windows based systems and at $HOME/.config/files-cli on Linux and Mac based systems.

Do not edit this file directly unless directed to by our Support team.

You can factory-reset the CLI App to a blank starting state by deleting, renaming, or moving this configuration file.

Get Instant Access to Files.com

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, then fill out the short form on the next page. Your account will be activated instantly. You can dive in and start yourself or let us help. The choice is yours.