Skip to content
File systemReference

movefile

Move a file or folder within the workspace.

Details#

Move a file or folder within the workspace. No return values.

Signature#

Luau
movefile(source: string, destination: string): ()

Parameters#

ParameterTypeDescription
sourcestringExisting workspace-relative source path.
destinationstringWorkspace-relative target path.

Returns#

No return values.

Examples#

Local example

Luau
writefile("docs-example/original-movefile.txt", "local note")
movefile("docs-example/original-movefile.txt", "docs-example/result-movefile.txt")