Skip to main content

The "vngen_file_delete" Function

Syntax#

vngen_file_delete(filename);
ArgumentTypeDescription
filenamestringThe complete filename of the target save file, including path and extension

Description#

Physically removes the target file from the hard drive (if it exists) and returns true or false depending on if the operation was successful.

Note that this function will only delete files previously created by GameMaker Studio.

Example#

if (vngen_file_delete(working_directory + "save.dat") == false) {
show_message("Delete failed!");
} else {
show_message("File deleted.");
}