<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/IOBluetoothGetUniqueFileNameAndPath(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:@F@IOBluetoothGetUniqueFileNameAndPath"
  },
  "title" : "IOBluetoothGetUniqueFileNameAndPath(_:_:)"
}
-->

# IOBluetoothGetUniqueFileNameAndPath(_:_:)

```
func IOBluetoothGetUniqueFileNameAndPath(_ inName: String!, _ inPath: String!) -> String!
```

## Parameters

`inName`

Name of file that needs unique name in the specified path.

`inPath`

Path you are trying to put file into.

## Return Value

String with a unique name appended on it for the provided path.

## Discussion

When passed a VALID filename and a VALID path, this routine will return you a the path with the name appended onto it. If it already exist, it will insert a #1, #2, etc. Example: If you pass @“TestFile.txt” and @”~/Documents”, you will get @“~Documents/TestFile.txt”. If one already exists, you will be returned: @“~Documents/TestFile #1.txt”.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)