Skip to main content

Rename Folder

Renames a folder or moves it to a different location within pCloud.

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 Login node.
  • Source Path - The current full path of the folder (e.g., "/Projects/OldName").
  • Target Path - The new full path for the folder, including the new name (e.g., "/Archive/NewName").

How It Works

The Rename Folder node changes a folder's name or location within pCloud. When executed, the node:

  1. Validates the Client Id
  2. Validates and normalizes the source path
  3. Validates and normalizes the target path
  4. Retrieves the authenticated pCloud client
  5. Renames or moves the folder on the server
  6. Returns success when the operation completes

This node can perform two operations:

  • Rename - Change the folder name in the same location
  • Move - Change the folder location (and optionally the name)

All contents of the folder (files and subfolders) are moved with the folder.

Requirements

  • An active pCloud connection (Client Id from Login node)
  • Source folder must exist at the specified path
  • Valid source and target paths
  • Appropriate permissions for both source and target locations
  • Parent folder of target must exist (for move operations)

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Client Id
  • Empty source path
  • Empty target path
  • Source folder does not exist
  • Target parent folder does not exist (for move operations)
  • Insufficient permissions
  • Target folder already exists (may cause conflict)
  • Network connectivity issues

Usage Notes

  • Both rename and move operations are supported
  • All folder contents are moved/renamed together
  • The operation happens entirely on pCloud servers
  • Paths are automatically normalized with leading "/"
  • Use "/" as the path separator
  • Folder names are case-sensitive
  • The source and target paths must both specify folder paths
  • Moving to a different location requires the parent folder to exist
  • Cannot move a folder into itself or its subdirectories

Path Format

Both source and target paths must specify the complete folder path:

  • Rename in same location:

    • Source: /Projects/Draft
    • Target: /Projects/Final
  • Move to different location:

    • Source: /Projects/Active
    • Target: /Archive/Active
  • Move and rename:

    • Source: /Projects/TempProject
    • Target: /Archive/CompletedProject

Best Practices

  • Verify the source folder exists before renaming
  • Ensure target parent folder exists before moving
  • Use meaningful folder names that describe contents
  • Consider using dates in folder names for archiving
  • Handle errors appropriately for reliability
  • For bulk operations, use Continue On Error
  • Test rename/move operations with non-critical folders first
  • Avoid moving large folder structures during peak usage times

Example: Simple Rename

Rename a folder in the same location:

Inputs:

  • Client Id: (from Login node)
  • Source Path: "/Projects/Q1_Planning"
  • Target Path: "/Projects/Q1_2024"

The folder is renamed from "Q1_Planning" to "Q1_2024" in Projects.

Example: Move to Archive

Move a folder to a different location:

Inputs:

  • Client Id: (from Login node)
  • Source Path: "/Active/CompletedProject"
  • Target Path: "/Archive/CompletedProject"

The folder and all its contents are moved to Archive.

Example: Move and Rename

Move a folder and change its name:

Inputs:

  • Client Id: (from Login node)
  • Source Path: "/Temp/ProjectX"
  • Target Path: "/Archive/ProjectX_2024_Complete"

The folder is moved to Archive with a descriptive name.

Common Automation Scenarios

Project Organization:

  • Move projects between Active and Archive
  • Rename project folders to reflect status
  • Organize by completion date
  • Maintain clean project structure

Data Archiving:

  • Move old data to archive folders
  • Rename folders with timestamps
  • Organize historical data
  • Implement retention policies

Workflow Management:

  • Move folders between workflow stages
  • Rename to indicate processing status
  • Organize by department or team
  • Manage collaborative spaces

Storage Organization:

  • Restructure folder hierarchies
  • Consolidate related folders
  • Standardize naming conventions
  • Implement organizational policies

Example: Archive Old Projects

Move completed projects to archive with date:

  1. Get Date - Get current date
  2. Format Date - Format as YYYY_MM
  3. Rename Folder
    • Source: /Active/ProjectName
    • Target: /Archive/${date}_ProjectName

This organizes archived projects by completion date.

Example: Batch Folder Organization

Organize multiple folders with a pattern:

  1. Set Variable - Create array of folder names
  2. For Each - Loop through folders
  3. Rename Folder
    • Source: /Unsorted/${folderName}
    • Target: /Organized/${category}/${folderName}

This reorganizes folders into categorized structure.

Example: Workflow Stage Movement

Move folders through processing stages:

  1. Complete Processing - Finish processing
  2. Rename Folder
    • Source: /InProgress/${projectName}
    • Target: /Completed/${projectName}
  3. Folder moved to completed stage

Example: Dynamic Reorganization

Reorganize folders based on criteria:

  1. List Folders - Get folder list
  2. For Each - Loop through folders
  3. Analyze Folder - Determine category
  4. Decision - Based on size/age/content
  5. Rename Folder - Move to appropriate location
    • If Active: → /Current/${folderName}
    • If Old: → /Archive/${year}/${folderName}

Rename vs Move

AspectRenameMove
LocationSame parentDifferent parent
NameChangesCan change or stay same
Path ChangeName onlyFull path
ContentsPreservedPreserved

Troubleshooting

Source Folder Not Found:

  • Verify the source path is correct
  • Check if the folder exists in pCloud
  • Ensure path uses forward slashes (/)
  • Verify spelling and case sensitivity

Target Parent Not Found:

  • Ensure target parent folder exists
  • Create the parent folder first if needed
  • Verify the path structure is correct

Operation Fails:

  • Check permissions on source and target locations
  • Verify paths are properly formatted
  • Ensure target name is valid (no illegal characters)
  • Check if target folder already exists
  • Cannot move folder into itself

Invalid Client ID:

  • Ensure Login node executed successfully
  • Verify Client Id is being passed correctly
  • Check if connection is still active

Folder Already Exists:

  • Target folder name may conflict with existing folder
  • Use different target names
  • Consider merging contents manually if needed

Large Folder Delays:

  • Moving large folders may take time
  • Check operation status
  • Ensure stable internet connection
  • Consider moving in smaller batches

Advanced Example: Automatic Archiving System

Automatically archive old project folders:

  1. List Folders - Get folders from /Active
  2. For Each - Loop through folders
  3. Get Folder Info - Check last modified date
  4. Calculate Age - Days since last modification
  5. Decision - If older than 90 days
  6. Format Date - Get archive date
  7. Create Folder - Ensure archive year folder exists
  8. Rename Folder
    • Source: /Active/${folderName}
    • Target: /Archive/${year}/${folderName}

This implements an automated archiving policy based on folder age.

Comparison: Rename Folder vs Rename File

FeatureRename FolderRename File
TargetFolderFile
Contents AffectedAll files and subfoldersN/A
ComplexityHigher (more items)Lower (single item)
RiskHigher (affects multiple items)Lower (single item)
Use CaseReorganize structureManage individual files

Best Practices for Large Operations

  • Test with small folders first
  • Verify paths carefully before execution
  • Monitor operation completion
  • Implement proper error handling
  • Log all rename/move operations
  • Consider notification on completion
  • Plan operations during low-usage periods