ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. fileRename

Function

fileRename

Server and clientFilesIdentical to MTA:SA

Renames a file or moves it within the resource folder.

Syntax

bool fileRename(string filePath, string newFilePath)

Arguments

filePathstring
Current path.
newFilePathstring
New path.

Returns

true on success.

Example

fileRename("log.txt", "logs/log_" .. os.date("%Y%m%d") .. ".txt")

See also