Copy File
Copies a file or folder from one location to another within Dropbox.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client ID - The client identifier returned from the Connect node.
- Source Path - Path to the source file or folder to copy (without leading slash).
- Destination Path - Path where the file or folder will be copied to (without leading slash).
How It Works
The Copy File node duplicates a file or folder from one location to another in your Dropbox account. When executed, the node:
- Validates the required inputs (Client ID, Source Path, and Destination Path)
- Retrieves the access token using the provided Client ID
- Prepends "/" to the paths as required by the Dropbox API
- Sends a copy request to the Dropbox API
- Creates a duplicate of the file or folder at the destination
Path Format
- Paths should be provided without a leading slash
- The node automatically adds the leading "/" for Dropbox API compatibility
- Examples:
- Input:
documents/report.pdf→ API uses:/documents/report.pdf - Input:
photos/2024→ API uses:/photos/2024
- Input:
Requirements
- A valid Dropbox connection (using the Connect node)
- The source file or folder must exist in Dropbox
- Write permissions for the destination path
- The destination path's parent folder must exist
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Client ID
- Empty Source Path
- Empty Destination Path
- Source file or folder does not exist
- Insufficient permissions for the destination path
- Parent folder of destination does not exist
- Dropbox API errors
Usage Notes
- The copy operation works for both files and folders
- If copying a folder, all contents are copied recursively
- The original file or folder remains unchanged
- If a file already exists at the destination, it will be overwritten
- The destination path should include the file or folder name
- Large files or folders may take longer to copy
Example 1: Copy a File
Copy a report from one folder to another:
Inputs:
- Client ID: (from Connect node)
- Source Path:
documents/2024/report.pdf - Destination Path:
archive/reports/report_2024.pdf
Result: The file is copied from /documents/2024/report.pdf to /archive/reports/report_2024.pdf
Example 2: Copy a Folder
Create a backup of a folder:
Inputs:
- Client ID: (from Connect node)
- Source Path:
projects/website - Destination Path:
backups/website_backup_2024
Result: The entire website folder and its contents are copied to backups/website_backup_2024
Example 3: Duplicate with Rename
Create a copy of a file with a new name in the same folder:
Inputs:
- Client ID: (from Connect node)
- Source Path:
templates/invoice_template.xlsx - Destination Path:
templates/invoice_template_v2.xlsx
Result: A copy is created in the same folder with a different name
Common Use Cases
- Creating backups of important files or folders
- Duplicating files for editing while preserving originals
- Organizing files by copying them to archive folders
- Creating versioned copies of documents
- Replicating folder structures
Best Practices
- Always verify the source path exists before copying
- Use descriptive destination paths to avoid confusion
- Consider using date stamps in destination paths for backups
- Check available storage space before copying large files
- Use the FileStat node to verify successful copy operations
Tips
- To rename a file, use the Move File node instead
- For creating backups, include timestamps in destination paths
- Test with small files first when automating large copy operations
- Use ListFiles to verify the copy was successful