↑↓ to navigate ↵ to open Esc to close Search by Algolia

You are reading the documentation of FileRun 2026.4.0, which is not released yet. It is subject to change, so do not use it for planning. Read this page for FileRun 2026.3.0

API: Moving files or folders

Target URL /api.php/Drive/files/move
Required scope modify
HTTP Method POST
Output format JSON

Request Parameters Reference

Parameter Type Required Description
path string Yes The FileRun path of the file/folder. See this page
moveTo string Yes The FileRun path of the destination folder. See this page
overwrite boolean (1/0) No Set to 1 to replace a file of the same name at the destination, or to merge a folder into a folder of the same name (since 2026.4.0).

Without overwrite, a move onto a name which is already taken at the destination is refused with the message There is already an item with the same name inside "Documents"!. Since FileRun 2026.4.0, the refusal also carries a conflicts array with one entry, which has path (the FileRun path of the moved item), filename (the name which is taken), existing (file or folder, what holds the name at the destination) and message (a sentence naming that item).

With overwrite set to 1:

  • A move onto an existing file replaces it. The replaced content is kept as a previous version of the file, or moved to the trash when file versioning is turned off. The moved file keeps its own metadata, shares and web links. Replacing requires that the account is allowed to delete the existing file.
  • A move onto an existing folder merges the two folders. The folder at the destination stays, with its own metadata and shares, and the contents of the moved folder go inside it, each item replacing or merging the same way. The moved folder, left empty, is then removed, together with its own metadata and shares.
  • A file never replaces a folder, nor a folder a file, at the top or anywhere inside a merged folder. Such a move is refused, with conflicts when it is the moved item itself.

Every check is made before anything is moved, so a refused merge leaves both folders as they were.