---
title: "(-- api-linter: core::0136::verb-noun=disabled aip.dev/not-precedent: Move is a custom method on a singleton resource. The \"move\" verb follows Unix convention (mv) and clearly conveys imperative action for filesystem operations. --) Moves or renames a file, directory, or symbolic link. By default, fails if the destination already exists. If the source is a symbolic link, the link itself is moved, not its target. If the destination exists and is a symbolic link, it will be replaced."
method: POST
path: "/v1/{name}/filesystem:move"
tags: ["FilesystemService"]
---

# (-- api-linter: core::0136::verb-noun=disabled aip.dev/not-precedent: Move is a custom method on a singleton resource. The "move" verb follows Unix convention (mv) and clearly conveys imperative action for filesystem operations. --) Moves or renames a file, directory, or symbolic link. By default, fails if the destination already exists. If the source is a symbolic link, the link itself is moved, not its target. If the destination exists and is a symbolic link, it will be replaced.

`POST /v1/{name}/filesystem:move`

## Request

- Base URL: `https://docs.h2o.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.h2o.ai/v1/{name}/filesystem:move`
- Auth: none declared
- TypeScript: <https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/docs/v1/:name/filesystem:move/post.ts> (a function with typed inputs; its response is checked against the schema)

Authorization: Only the creator of the parent SandboxEngine is allowed to call this method.

## Path parameters

- `name` string, required

## Request body

- object: Request to move or rename a file, directory, or symbolic link.
  - `sourcePath` string, required: Required. The path of the source. All paths are rooted at the sandbox filesystem root. Must start with a forward slash (e.g., "/old.js", "/workspace/old.js"). If the source is a symbolic link, the link itself is moved, not its target.
  - `destinationPath` string, required: Required. The path of the destination. All paths are rooted at the sandbox filesystem root. Must start with a forward slash (e.g., "/new.js", "/workspace/new.js"). If the destination is a symbolic link, it will be replaced.
  - `overwrite` boolean, nullable: Optional. If true, overwrites the destination if it already exists. If explicitly set to false or unspecified, the operation will fail if the destination exists.
  - `createParentDirectories` boolean: Optional. If true, creates parent directories of the destination path if they don't exist. If false or unspecified, the operation will fail if parent directories don't exist.

## Response `200`

A successful response.

- V1MoveResponse: Response from moving a file, directory, or symbolic link.
  - `fileInfo` V1FileInfo: FileInfo contains metadata about a file or directory.
    - `path` string: Output only. The absolute path of the file or directory.
    - `size` string, int64: Output only. The size of the file in bytes. For directories, this is typically 0 or the size of the directory metadata.
    - `type` 'FILE_TYPE_UNSPECIFIED' | 'FILE_TYPE_REGULAR' | 'FILE_TYPE_DIRECTORY' | 'FILE_TYPE_SYMLINK': FileType indicates the type of filesystem entry. - FILE_TYPE_UNSPECIFIED: The file type is not specified. - FILE_TYPE_REGULAR: A regular file. - FILE_TYPE_DIRECTORY: A directory. - FILE_TYPE_SYMLINK: A symbolic link.
    - `modifyTime` string, date-time: Output only. The last modification time of the file or directory (mtime).
    - `mode` string: Output only. Unix file mode and permission bits in octal notation. The format follows standard Unix permissions represented as a string. Examples: "0644" (rw-r--r--), "0755" (rwxr-xr-x), "0777" (rwxrwxrwx).

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto.md) - [All operations](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/revisions/297cfadc1d39?raw)
