MMpy.File.copy

Syntax

MMpy.File.copy(source_file_path, destination_file_path)

Description

Copy a file, its structure and its data to a new file.

Parameters

Name
Type
Description

source_file_path 

str The path of the Data file to copy.

destination_file_path 

str The path of the copied Data file.

Returns

Type
Description
bool Returns True if successful, False otherwise.

See Also

MMpy.File.create_from_template

Notes

If the destination file does not exist, a new file is created. Otherwise, the file is overwritten.

This is a static class method.

Examples

source_file_path = MMpy.Project.path() + 'InFile.DAT'
destination_file_path = MMpy.Project.path() + 'OutFile.DAT'
MMpy.File.Copy(source_file_path, destination_file_path)

Resource ID

IDPH_FILE_COPY