Skip to main content

Move Files and Directories

Moves or renames files and directories within ftpGrid storage.

The endpoint supports:

  • File renaming
  • File relocation between directories
  • Directory renaming
  • Directory relocation

Multiple move operations may be performed in a single request.

Required Scope

file.rename

Endpoint

POST /api/move

Example Request (HTTPie)

http POST https://webN.ftpgrid.com/api/move \
Authorization:"Bearer YOUR_TOKEN" \
Movelist:='[
{
"from": "/documents/mydocument.docx",
"to": "/archive/2026/mydocument.docx"
},
{
"from": "/projects/project-a",
"to": "/projects/project-a-archived"
}
]'

Raw JSON Body

{
"Movelist": [
{
"from": "/documents/mydocument.docx",
"to": "/archive/2026/mydocument.docx"
},
{
"from": "/projects/project-a",
"to": "/projects/project-a-archived"
}
]
}

Request Parameters

ParameterTypeDescription
MovelistarrayArray of move or rename operations

Move Object Fields

FieldTypeDescription
fromstringExisting source file or directory path
tostringDestination file or directory path

Example Response

{
"rslt": "OK"
}

Relative Rename Behavior

If the to path does not start with /, the destination is treated as relative to the current parent directory.

Example:

[
{
"from": "/new/path2",
"to": "path3"
}
]

This moves:

/new/path2

to:

/path3

Notes

  • Multiple move operations may be executed in a single request
  • Existing destination files or directories are not overwritten
  • The operation fails if the destination already exists
  • Destination parent directories must already exist
  • The endpoint does not create directories automatically
  • Both files and directories may be moved or renamed
  • Moving a directory also moves its contents recursively
  • Paths are UNIX-style paths
  • Paths may contain spaces and UTF-8 characters
  • Paths are automatically sanitized and normalized
  • Invalid or unsafe paths are rejected
  • Metadata updates may be eventually consistent immediately after move operations