# CopyFile

> Copies a file from a specified location to another.

Copies a file from a specified location to another.

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## `CopyFile(String, String, Bool)`

```
void CopyFile(
    string path,
    string destination,
    bool overwrite
)
```

`path` [String](https://learn.microsoft.com/dotnet/api/system.string) : The path of the file to be copied.

`destination` [String](https://learn.microsoft.com/dotnet/api/system.string) : The destination path where to copy the file. If you provide a file path, the file is copied with the name in the provided path. If you provide a folder path, the file is copied with the original name.

`overwrite` [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) : When checked, overwrites the files in the destination folder with the file that is to be copied.
