; CopyFile Example ; ---------------- ; Create an original file to copy file=WriteFile("demo_original.txt") WriteLine file,"Precious save-game data" CloseFile file Print "Created demo_original.txt ("+FileSize("demo_original.txt")+" bytes)" ; Copy it - a simple way to back up a save file CopyFile "demo_original.txt","demo_backup.txt" Print "Copied to demo_backup.txt ("+FileSize("demo_backup.txt")+" bytes)" ; Prove the copy holds the same text file=ReadFile("demo_backup.txt") Print "Backup contains: "+ReadLine$(file) CloseFile file ; Clean up both demo files DeleteFile "demo_original.txt" DeleteFile "demo_backup.txt" Print "Cleaned up both demo files" Print "" Print "Press any key to close the example" WaitKey End