Actions7
File → Move Resource
AI-generatedOverview
This node enables interaction with WebDAV servers to perform various file operations, specifically including moving files or directories on the server. The "Move Resource" operation allows users to relocate a file or folder from one path to another within the same WebDAV server.
Common scenarios for this node include:
- Organizing files by moving them into different folders.
- Renaming files or directories by moving them to a new path with a different name.
- Automating file management workflows where files need to be relocated after processing.
For example, you might move a processed report from a temporary upload folder to a final archive directory on your WebDAV server.
Properties
| Name | Meaning |
|---|---|
| Source Path | The current path of the file or folder to move. Must start with "/". Spaces and special characters are automatically encoded. |
| Destination Path | The new path where the resource will be moved. Must start with "/". Spaces and special characters are automatically encoded. |
| Overwrite | Boolean option indicating whether to overwrite the destination if it already exists (true or false). |
Output
The node outputs JSON data describing the result of the move operation for each input item:
success: Boolean indicating if the move was successful (HTTP status code 2xx).statusCode: HTTP status code returned by the WebDAV server.sourcePath: The original path of the resource before moving.destinationPath: The target path where the resource was moved.
No binary data is output by this operation.
Example output JSON:
{
"success": true,
"statusCode": 201,
"sourcePath": "/path/to/source",
"destinationPath": "/path/to/destination"
}
Dependencies
- Requires an API key credential configured with the WebDAV server's base URL and authentication details.
- The base URL must include the protocol (http:// or https://) and be correctly set in the credentials.
- The node uses HTTP methods defined by the WebDAV protocol, such as MOVE.
- Network access to the WebDAV server must be available from the n8n instance.
Troubleshooting
- Invalid Base URL: If the base URL in credentials is missing or does not start with http:// or https://, the node will throw an error. Ensure the URL includes the protocol and points to the correct WebDAV endpoint.
- Absolute URLs in paths: Paths must be server-relative starting with "/". Using absolute URLs in source or destination paths will cause errors.
- Cross-server moves: The destination must be on the same server as the base URL. Moving resources across different servers is not supported and will throw an error.
- Connection issues: Errors like "Host not found", "Connection refused", or "Connection timed out" indicate network or server availability problems.
- Overwrite conflicts: If
overwriteis false and the destination exists, the move may fail with a conflict error. - Permission errors: Insufficient permissions on the WebDAV server can cause HTTP errors; verify user rights for move operations.