The "file_move" Function

Syntax

file_move(fname, dest);
ArgumentTypeDescription
fnamestringThe full path of the file to move, including name and extension
deststringThe destination folder to move file to, not including filename

Description

Moves a file on the disk to a new folder, removing it from the original location. Will also return true or false to indicate if the operation succeeded.

caution

On Android, files must be loaded into memory to be moved. It is not recommended to move very large files that could exceed the RAM capacity of some users' phones.

important

By default, this script can only be used to scan directories within working_directory or elsewhere previously granted access via the get_save_filename function. On desktop platforms, this limitation can be removed by disabling the filesystem sandbox in Game Settings.

Example

file_move(working_directory + "temp.sav", working_directory + "saves");