MoveOnReboot

Description:

baMoveOnReboot moves a file on system reboot.

Platforms:

Windows

Usage:

Result = baMoveOnReboot( SourceFile, DestFile )

Arguments:

String, string.
SourceFile is the file to move.
DestFile is the new name of the file.

Returns:

Integer.
The function returns 1 if successful, otherwise 0. Note that the function can not check if the file will actually be moved/deleted, only that Windows will attempt to do it when the system next reboots.

Examples:

Director:
OK = baMoveOnReboot( "c:\Data\student.log", "c:\Backup\student.log" )

Authorware:
OK := baMoveOnReboot( "c:\\Data\\student.log", "c:\\Backup\\student.log" )
 

Notes:

This function allows you to move or delete a file that is currently in use by Windows and can't be moved or deleted until Windows restarts.

Passing in an empty string as the DestFile will mean that the file will be deleted on reboot.

This function will work on folders as well as files.