Check which files already exist in a folder.
Needs View Folders, View Folder Contents and View Document Metadata. The bulk uploader's duplicate check: of the items sent, the subset whose file already exists as a document in that same folder, matched by original file name (mode filename) or content hash (mode filehash, the SHA-1 hex byte pairs joined by '-', upper case). Gated on folder access, not on each document: a duplicate you cannot open still counts, and a folder you cannot access is dropped, never reported. Up to 1000 items; changes nothing.
| |
|---|
| Scope | folders:read |
| Asynchronous | No |
| MCP tool | check_folder_existing_files |
| Portal permissions | view_folders, view_folder_contents, view_document_metadata |
Parameters
| Name | In | Type | Required | Description |
|---|
Docwize-Version | header | string (date) | Optional | |
Request body
Responses
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
FolderExistingFiles
| Field | Type | Required | Description |
|---|
existing | array of FolderFileCandidate | Required | The items of the request whose file already exists in its folder, in the order sent. |
| Field | Type | Required | Description |
|---|
items | array of FolderFileCandidateInput | Required | The files to look for, up to 1000. |
mode | string: filename, filehash | Required | filename matches the original file name; filehash the content hash. |
FolderFileCandidate
| Field | Type | Required | Description |
|---|
folder_id | string | Required | The folder to look in. |
value | string | Required | The original file name (mode filename) or the content hash (mode filehash). |
| Field | Type | Required | Description |
|---|
folder_id | string | Required | The folder to look in. |
value | string | Required | The original file name (mode filename) or the content hash (mode filehash). |