file
Type: Directory
The /file menu lists user files on the router's storage and manages them: creating, editing, copying and deleting files and directories. For an uploaded RouterOS .npk file, the menu also shows package details, such as the architecture and build time. Files and directories shared through File Share (Back To Home) are marked with the shared flag and have a url property with the share link. See the Files guide.
| Flag | Name | Description |
|---|
| S | shared | The file or directory is shared through File Share (Back To Home). |
| Argument | Type | Description |
|---|
| name ( mandatory ) | file | Name of the file or directory, including the path. A leading / is optional. |
| type | enum (file | directory) | Type of the entry. Default: file. |
| contents | string | The actual content of the file. Limited to just under 60 KiB (61439 bytes): creating a file with longer contents fails, and files larger than that return nothing here. Use /file/read to read larger files. |
| Read-only Argument | Type | Description |
|---|
| size | num | File size in bytes. |
| last-modified | date | Time when the file was created or last modified. |
| package-name | string | Name of the installable package. Applies only to RouterOS .npk files. |
| package-version | string | Version of the installable package. Applies only to RouterOS .npk files. |
| package-build-time | date | Time when the package was built. Applies only to RouterOS .npk files. |
| package-architecture | string | Architecture that the package is built for. Applies only to RouterOS .npk files. |
| url (syscap=cloud-vpn) | string | URL for cloud VPN file sharing. Shown for files and directories shared through File Share (Back To Home). |