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.

Ready to Transform Your File Infrastructure?

Join over 4,000 organizations that trust Files.com to manage their mission-critical file flows. Start your free trial today and see why we're the #1 rated file orchestration platform.

No credit card required • 7-day free trial • Setup in minutes