Skip to main content

Uploading Files and Folders

The CLI App can be used to upload files and folders to your Files.com site. Uploads can be made to any destination folder, including those located within Remote Server Mounts.

Uploading Files and Folders

To upload a single file, use the command:

files-cli upload /local/path/to/file.txt /remote/path/to/file.txt

or

files-cli upload /local/path/to/file.txt /remote/path/to/folder/

To upload a single folder, use the command:

files-cli upload /local/path/to/folder/ /remote/path/to/folder/

Using Wildcards To Upload Multiple Files Or Folders

You can also upload multiple files and folders by using wildcard characters to specify the files or folders that should be targeted for the upload action.

To upload multiple files, use the command:

files-cli upload *.txt /remote/path/to/folder/

or

files-cli upload /path/to/*/subfolder/*.txt /remote/path/to/folder/

To upload the contents of multiple folders into a single destination folder use the command:

files-cli upload /local/path/to/*/ /remote/path/to/folder/

or

files-cli upload */ /remote/path/to/folder/

or

files-cli upload /path/to/first/folder/ /path/to/second/folder/ /path/to/third/folder/ /remote/path/to/folder/

Uploading Into Multiple Destination Folders

Wildcards cannot be used to upload or download into multiple destination folders. The contents of the source folders will be merged into the destination folder whenever wildcards are used.

For example, let's say you have three source folders, named C:\Source\FolderOne, D:\Source\FolderTwo, and E:\AnotherSource\FolderThree. You want to upload these folders to Files.com into a folder named Destination, so that you end up with destination folders named Destination/FolderOne, Destination/FolderTwo and Destination/FolderThree.

Using a wildcard isn't possible as the contents of the source folders will be merged into the destination folder.

Instead, you need to perform a separate upload, or download, for each destination like this:

files-cli upload C:\Source\FolderOne Destination\FolderOne
files-cli upload D:\AnotherSource\FolderTwo Destination\FolderTwo
files-cli upload E:\YetAnotherSource\FolderThree Destination\FolderThree

Viewing Connection Information

You can see the connection information, showing the number of open data connections, the number of open API connections, and the network throughput, by using the --connection-metrics flag.

files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --connection-metrics

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