Skip to main content

Move File

Moves 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.
info

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 move (without leading slash).
  • Destination Path - Path where the file or folder will be moved to (without leading slash).

How It Works​

The Move File node relocates a file or folder from one location to another in your Dropbox account. When executed, the node:

  1. Validates the required inputs (Client ID, Source Path, and Destination Path)
  2. Retrieves the access token using the provided Client ID
  3. Prepends "/" to the paths as required by the Dropbox API
  4. Sends a move request to the Dropbox API
  5. Moves the file or folder to the destination (effectively removes it from source)

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: archive/old_reports → API uses: /archive/old_reports

Requirements​

  • A valid Dropbox connection (using the Connect node)
  • The source file or folder must exist in Dropbox
  • Write permissions for both source and destination paths
  • The destination path's parent folder must exist

Move vs Copy​

Unlike Copy File:

  • The original file or folder is removed from the source location
  • This is more efficient than copying and then deleting
  • Use Move for reorganizing files without duplication
  • Use Copy when you need to keep the original

Rename Files​

The Move File node can also be used to rename files or folders by moving them within the same directory:

Example: Rename a file

  • Source Path: documents/old_name.pdf
  • Destination Path: documents/new_name.pdf

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 source or destination path
  • Parent folder of destination does not exist
  • Destination path already exists
  • Dropbox API errors

Usage Notes​

  • The move operation works for both files and folders
  • If moving a folder, all contents are moved recursively
  • The source file or folder is removed after the move
  • If a file already exists at the destination, the operation will fail
  • The destination path should include the file or folder name
  • Moving is atomic - it either succeeds completely or fails

Example 1: Move a File to Another Folder​

Move a completed report to the archive:

Inputs:

  • Client ID: (from Connect node)
  • Source Path: reports/current/march_report.pdf
  • Destination Path: reports/archive/march_report.pdf

Result: The file is moved from /reports/current/ to /reports/archive/

Example 2: Rename a File​

Rename a file without changing its location:

Inputs:

  • Client ID: (from Connect node)
  • Source Path: documents/draft_proposal.docx
  • Destination Path: documents/final_proposal.docx

Result: The file is renamed from draft_proposal.docx to final_proposal.docx

Example 3: Move a Folder​

Relocate an entire project folder:

Inputs:

  • Client ID: (from Connect node)
  • Source Path: active_projects/website_redesign
  • Destination Path: completed_projects/website_redesign

Result: The entire folder and its contents are moved to the new location

Example 4: Organize by Date​

Move files to a date-based folder structure:

Inputs:

  • Client ID: (from Connect node)
  • Source Path: uploads/invoice.pdf
  • Destination Path: invoices/2024/03/invoice.pdf

Result: The file is organized into a year/month folder structure

Common Use Cases​

  • Reorganizing files into different folders
  • Renaming files or folders
  • Archiving completed work
  • Moving files to processed/completed folders after workflows
  • Organizing files by date, category, or project
  • Implementing file lifecycle management
  • Moving files between team folders
  • Cleaning up upload directories

Best Practices​

  • Always verify the source path exists before moving (use FileStat)
  • Ensure the destination parent folder exists
  • Use descriptive destination paths for better organization
  • Consider using date stamps in destination paths for archives
  • Check that destination doesn't already exist to avoid errors
  • Use error handling for cases where moves might fail
  • Log move operations for audit trails

Pattern: Process and Archive​

Move files to archive after processing:

DownloadFile
↓
Process file locally
↓
If processing successful
├─ MoveFile (move to archive folder)
└─ Log "File archived"
Else
└─ Log "Processing failed, file not moved"

Pattern: Organize Files by Type​

Move files to appropriate folders based on extension:

ListFiles
↓
Loop through files array
├─ If file.name ends with ".pdf"
│ └─ MoveFile (move to pdf_folder)
├─ Else if file.name ends with ".xlsx"
│ └─ MoveFile (move to excel_folder)
└─ Continue

Pattern: Date-Based Organization​

Organize files into year/month folders:

Get current_year and current_month
↓
Set destination = "archive/" + current_year + "/" + current_month + "/" + filename
↓
MoveFile (source to destination)

Pattern: Rename with Timestamp​

Add timestamp to filename:

Get current_timestamp
↓
Set new_name = filename + "_" + current_timestamp + extension
↓
Set destination = same_folder + "/" + new_name
↓
MoveFile (rename with timestamp)

Pattern: Smart Archive​

Move files to archive only if older than 30 days:

FileStat
↓
If file.mod_time < (current_date - 30 days)
├─ Set archive_path = "archive/" + file.name
├─ MoveFile (move to archive)
└─ Log "File archived"
Else
└─ Log "File too recent, not archived"

Tips​

  • Use MoveFile instead of CopyFile + DeleteFile for efficiency
  • For renaming, keep the same directory path and only change the filename
  • Verify destination parent folders exist before moving
  • Use variables for dynamic destination paths based on dates or metadata
  • Consider creating destination folders with CreateFolder before moving
  • Test move operations with non-critical files first
  • Implement rollback logic for critical move operations

Handling Special Cases​

Moving to a folder with same name:

  • If destination already has a file with the same name, the operation fails
  • Consider renaming the file during the move or checking existence first

Moving folders:

  • All contents are moved recursively
  • Folder structure is preserved
  • Original folder is removed

Cross-folder moves:

  • Works the same as same-folder moves
  • Both source and destination must be in the same Dropbox account

Error Recovery​

If a move fails:

  • Verify the source file exists using FileStat
  • Check that destination parent folder exists
  • Ensure destination doesn't already exist
  • Verify you have write permissions for both locations
  • Check path spelling and format
  • Review Dropbox API status and rate limits

Combining with Other Operations​

Move after upload:

UploadFile (to temp folder)
↓
Verify upload successful
↓
MoveFile (from temp to final location)

Conditional move based on content:

DownloadFile
↓
Analyze file content
↓
If meets criteria
└─ MoveFile (to approved folder)
Else
└─ MoveFile (to rejected folder)

Performance Considerations​

  • Moving is faster than copying + deleting
  • Large folders may take time to move
  • Network latency affects move speed
  • Moving within Dropbox is server-side (very fast)
  • No data transfer required - just metadata update

Security Considerations​

  • Ensure you have permissions for both source and destination
  • Moving files doesn't change their sharing settings
  • Shared files remain shared after moving
  • Moving to a team folder may change access permissions
  • Consider audit logging for compliance requirements

Differences from Local Filesystem​

  • In Dropbox, moving is a metadata operation (fast)
  • No data is actually transferred during a move
  • Shared links remain valid after moving
  • File history is preserved
  • Moving doesn't affect file IDs in Dropbox