Uploading Files and Folders
The CLI App uploads files and folders to your Files.com site. The destination can be any folder on your site, including folders inside Remote Server Mounts.
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 upload multiple files and folders by using wildcard characters to specify which files or folders to target.
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 upload or download into multiple destination folders. When wildcards are used, the contents of the source folders merge into a single destination folder.
For example, say you have three source folders named C:\Source\FolderOne, D:\Source\FolderTwo, and E:\AnotherSource\FolderThree. You want to upload these into a folder named Destination on Files.com, ending up with Destination/FolderOne, Destination/FolderTwo, and Destination/FolderThree.
A wildcard won't produce that result, because the source folder contents merge into the destination folder.
Instead, perform a separate upload (or download) for each destination:
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
Get The File Orchestration Platform Today
4,000+ organizations trust Files.com for mission-critical file operations. Start your free trial now and build your first flow in 60 seconds.
No credit card required • 7-day free trial • Setup in minutes