renameLockedFile()
Renames a file, including any file that is currently in use. The file is renamed the next time the system is rebooted. The specified filename is a complete file path name. Can be used to delete a file that is currently in use if the "new file name" is left blank. The file is deleted when the system is rebooted.
Example
renameLockedFile("c:\temp\unlocked_file.txt", "c:\temp\locked_file.txt", "All Operating Systems", "Halt on Fail")