# CreateFile

> Creates an empty file in the specified location.

Creates an empty file in the specified location. If a file already exists at that location, it is replaced. If you want to create a file in which you want to write, it is recommended to use the [AppendLine](https://docs.uipath.com/activities/other/latest/workflow/uipath-core-activities-api-isystemservice-appendline) method.

## Definition

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

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

## `CreateFile(String, String)`

```
ILocalResource CreateFile(
    string name,
    string path
)
```

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

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

## Return value

`ILocalResource`

The file created by the activity.
