File Operations
Create folders, move/rename, delete, search/list, and download files into your project storage.
What is this block?
The File Operations block manages files and folders inside your RAPFlow project storage. It supports:
- Create folders
- Move or rename items
- Delete by explicit names and/or glob patterns
- Search/list file/folder metadata
- Download external files into the project storage
Inputs and Configuration
Project base directory
The block automatically derives the storage root from the current RAPFlow project context.
- Do not provide
msg.payload.path(the block overwrites it). - Treat all paths you pass in
msg.payloadas relative to this storage root.
Depending on the operation, you’ll provide some of these keys in msg.payload:
names(array of strings): items to create/delete/list/downloadsources(array of strings): items to move (formove)sources(string): item to rename (forrename)source(string, optional): rename workaround in some deploymentsdestination(string): target directory/path (move/rename)pattern(string): glob pattern for delete/searchdestination_dir(string): download destination folder (relative)
Create Folder (create)
Required:
msg.payload.names: array of folder paths to create (relative)
Move (move)
Required:
msg.payload.sources: array of file/folder paths to move (relative)msg.payload.destination: destination directory/path (relative)
Rename (rename)
Required:
msg.payload.sources: a single file/folder path to rename (string, not a list)msg.payload.destination: the new path/name (relative)
If rename fails in your environment, also try setting msg.payload.source to the same value as msg.payload.sources.
Delete (delete)
Provide at least one:
msg.payload.names: array of items to deletemsg.payload.pattern: glob pattern to match items
The block will delete files or folders based on the selected resource_type.
Search / List (search_list)
Provide either/both:
msg.payload.names: array of explicit items to listmsg.payload.pattern: glob pattern
If you provide neither, it defaults to listing everything (pattern="*") under the base directory.
Download (download)
Required:
msg.payload.names: array of identifiers to download (URLs, object keys, file IDs, etc. depending on the selected Source)
Optional:
msg.payload.destination_dir: relative destination folder
Configured in the block UI:
source:s3,gdrive,onedrive,sharepoint,wget, orurlfile_access_type:publicorprivatefor Google Drive, OneDrive, and SharePoint
Additional runtime requirements depend on the selected source:
s3: providebucket_namein the block config or inmsg.payload- private
gdrive/onedrive/sharepoint: provide an access token - private
onedrive/sharepoint: also providedrive_id - public
onedrive/sharepoint:namesmust contain share URLs
Outputs
On success, the block returns an object in msg.payload from the File Operations service. Common keys include status, and operation-specific fields like:
input/paths/items
Typical output shapes:
- Create:
{ "status": "success", "names": [...], "type": "folder" } - Move/Rename:
{ "status": "success", "input": { "sources": ..., "destination": ... } } - Delete:
{ "status": "success", "input": { "names"?: [...], "pattern"?: "..." } } - Search/List:
{ "status": "success", "items": [ { "name": "...", "type": "...", ... } ] } - Download:
{ "status": "success" | "partial_success" | "failed", "paths": [...], ... }
Example
Create folders
{ "names": ["datasets/invoices", "datasets/2026"] }Move files
{
"sources": ["inbox/a.txt", "inbox/b.txt"],
"destination": "archive/2026-02-06"
}Delete by glob pattern
{ "pattern": "tmp/**/*.log" }Download from URLs
{
"destination_dir": "downloads",
"names": ["https://example.com/file1.pdf", "https://example.com/file2.pdf"]
}Limitations
- All paths/identifiers must be relative to the project storage root.
- Download enforces extension and MIME allowlists, optional virus scanning, and a maximum file size; disallowed files are rejected.
- Downloads can be partially successful (
partial_success) if some files fail.
Common Mistakes
- Trying to set
msg.payload.path(the block overwrites it). - Using absolute paths in
names/sources. - For
delete, providing neithermsg.payload.namesnormsg.payload.pattern. - For
rename, sendingmsg.payload.sourcesas a list instead of a single string. - Assuming download always succeeds for every item.