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.
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:
- Validates the Client Id
- Validates and normalizes the source path
- Validates and normalizes the target path
- Retrieves the authenticated pCloud client
- Renames or moves the folder on the server
- 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
- Source:
-
Move to different location:
- Source:
/Projects/Active - Target:
/Archive/Active
- Source:
-
Move and rename:
- Source:
/Projects/TempProject - Target:
/Archive/CompletedProject
- Source:
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:
- Get Date - Get current date
- Format Date - Format as YYYY_MM
- Rename Folder
- Source:
/Active/ProjectName - Target:
/Archive/${date}_ProjectName
- Source:
This organizes archived projects by completion date.
Example: Batch Folder Organization
Organize multiple folders with a pattern:
- Set Variable - Create array of folder names
- For Each - Loop through folders
- Rename Folder
- Source:
/Unsorted/${folderName} - Target:
/Organized/${category}/${folderName}
- Source:
This reorganizes folders into categorized structure.
Example: Workflow Stage Movement
Move folders through processing stages:
- Complete Processing - Finish processing
- Rename Folder
- Source:
/InProgress/${projectName} - Target:
/Completed/${projectName}
- Source:
- Folder moved to completed stage
Example: Dynamic Reorganization
Reorganize folders based on criteria:
- List Folders - Get folder list
- For Each - Loop through folders
- Analyze Folder - Determine category
- Decision - Based on size/age/content
- Rename Folder - Move to appropriate location
- If Active: →
/Current/${folderName} - If Old: →
/Archive/${year}/${folderName}
- If Active: →
Rename vs Move
| Aspect | Rename | Move |
|---|---|---|
| Location | Same parent | Different parent |
| Name | Changes | Can change or stay same |
| Path Change | Name only | Full path |
| Contents | Preserved | Preserved |
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:
- List Folders - Get folders from /Active
- For Each - Loop through folders
- Get Folder Info - Check last modified date
- Calculate Age - Days since last modification
- Decision - If older than 90 days
- Format Date - Get archive date
- Create Folder - Ensure archive year folder exists
- Rename Folder
- Source:
/Active/${folderName} - Target:
/Archive/${year}/${folderName}
- Source:
This implements an automated archiving policy based on folder age.
Comparison: Rename Folder vs Rename File
| Feature | Rename Folder | Rename File |
|---|---|---|
| Target | Folder | File |
| Contents Affected | All files and subfolders | N/A |
| Complexity | Higher (more items) | Lower (single item) |
| Risk | Higher (affects multiple items) | Lower (single item) |
| Use Case | Reorganize structure | Manage 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