POST /files/move
Move or rename a file or directory.
This is a device HTTP route. Set DEVICE_URL to your reachable device URL; connection and examples explain how. Do not append this path to the public MCP URL.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
path | JSON string | Existing relative source path. |
destination | JSON string | Relative destination; must not exist. |
expectedSha256 | JSON string | Required for a regular file; use the current hash. |
Response
JSON {path,destination,moved:true}.
Example
sh
curl --fail-with-body "$DEVICE_URL/files/move" \
-H 'Content-Type: application/json' \
-d '{"path":"Demo.cso","destination":"Renamed.cso"}'Notes
Active script/project paths and folders containing retained automated runs may be protected. Stop the related run and inspect its records before changing them.
Paths are relative to Scripts. Absolute paths, parent traversal and symlink traversal are rejected. File rules apply to every file endpoint.
Check the HTTP status and any JSON error. HTTP workflows and error handling explain shared limits. All endpoints.