Skip to content

CopyFile

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions

Blitz3DBlitzPlusBlitzBasic

CopyFile

CopyFile:Void file:String, to:String
Parameter Mode Type Default Description
file In String required The file to copy.
to In String required The name of the copy.

Description

Copies a file. An existing file at the destination is overwritten.

Examples

file = WriteFile("files_copy_a.tmp")
WriteInt file, 42
CloseFile file
CopyFile "files_copy_a.tmp", "files_copy_b.tmp"
Print FileSize("files_copy_b.tmp")
DeleteFile "files_copy_a.tmp"
DeleteFile "files_copy_b.tmp"
4

Related Commands

CloseFile, DeleteFile, FilePos, NextFile, OpenFile, ReadFile, SeekFile, WriteFile

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally