Skip to main content
Version: 7.25

file


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.

FlagNameDescription
SsharedThe file or directory is shared through File Share (Back To Home).
ArgumentTypeDescription
name ( mandatory )fileName of the file or directory, including the path. A leading / is optional.
typeenum (file | directory)Type of the entry. Default: file.
contentsstringThe 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 ArgumentTypeDescription
sizenumFile size in bytes.
last-modifieddateTime when the file was created or last modified.
package-namestringName of the installable package. Applies only to RouterOS .npk files.
package-versionstringVersion of the installable package. Applies only to RouterOS .npk files.
package-build-timedateTime when the package was built. Applies only to RouterOS .npk files.
package-architecturestringArchitecture that the package is built for. Applies only to RouterOS .npk files.
url (syscap=cloud-vpn)stringURL for cloud VPN file sharing. Shown for files and directories shared through File Share (Back To Home).