---
title: currentDirectoryPath
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/process/currentdirectorypath
---

# currentDirectoryPath

Sets the current directory for the receiver.

## Declaration

```swift
var currentDirectoryPath: String { get set }
```

## Parameters

- `path`: The current directory for the task.

## Discussion

Discussion If this method isn’t used, the current directory is inherited from the process that created the receiver. This method raises an NSInvalidArgumentException if the receiver has already been launched.

## See Also

### Deprecated

- [launchedProcess(launchPath:arguments:)](foundation/process/launchedprocess(launchpath:arguments:).md)
- [launchPath](foundation/process/launchpath.md)
- [launch()](foundation/process/launch().md)
