---
title: "setTitleWithRepresentedFilename(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/settitlewithrepresentedfilename(_:)"
---

# setTitleWithRepresentedFilename(_:)

Sets a given path as the window’s title, formatting it as a file-system path, and records this path as the window’s associated file.

## Declaration

```swift
func setTitleWithRepresentedFilename(_ filename: String)
```

## Parameters

- `filename`: The file path to set as the window’s title.

## Discussion

Discussion The windows’ title bar displays the filename, not the file’s path.

## See Also

### Related Documentation

- [miniwindowTitle](appkit/nswindow/miniwindowtitle.md)

### Managing Titles

- [title](appkit/nswindow/title.md)
- [subtitle](appkit/nswindow/subtitle.md)
- [titleVisibility](appkit/nswindow/titlevisibility-swift.property.md)
- [representedFilename](appkit/nswindow/representedfilename.md)
- [representedURL](appkit/nswindow/representedurl.md)
