SLUDGE

renameFile


Syntax:

renameFile (oldFilename, newFilename);

Purpose:

Renames the file specified by oldFilename to newFilename - which should both be strings, not file handles. If you're writing a custom save game mechanism, you may require this functionality... so here it is. The strings oldFilename and newFilename shouldn't contain any of the characters ":", "/" and "\" - a precaution to make it more difficult to write malicious code.

This function supports filename bodging - for details see the bodgeFilenames command.

Return value:

The command returns TRUE if the renaming was a success, FALSE otherwise.

See also:

fileExists

getMatchingFiles

loadGame

saveGame

deleteFile