win32api.MoveFileEx

MoveFileEx(srcName, destName, flag)

Renames a file.

Parameters

srcName : string

The name of the source file.

destName : string

The name of the destination file. May be None.

flag : int

Flags indicating how the move is to be performed. See the API for full details.

Comments

This method can move files across volumes.
If destName is None, and flags contains win32con.MOVEFILE_DELAY_UNTIL_REBOOT, the file will be deleted next reboot.

Win32 API References

Search for MoveFileEx at msdn, google or google groups.