Garry's Mod Wiki

file.Rename

  boolean file.Rename( string orignalFileName, string targetFileName )

Description

Attempts to rename a file with the given name to another given name.

This function is constrained to the data/ folder.

Arguments

1 string orignalFileName
The original file or folder name. See file.Write for details on filename restrictions when writing to files.

This argument will be forced lowercase.

2 string targetFileName
The target file or folder name. See file.Write for details on filename restrictions when writing to files.

This argument will be forced lowercase.

Returns

1 boolean
true on success, false otherwise.