> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getcustomasset

> Copies an existing regular workspace file into ExtraContent/<hwid>/ and returns an rbxasset:// string for the copied asset path.

<div className="real-function-page">
  ```lua theme={null}
  getcustomasset(path: string): string
  ```

  ## Aliases

  * `getsynasset`

  ## Arguments

  <ParamField path={"path"} type={"string"} required>
    Path resolved inside the workspace after separator normalization and workspace-boundary checks. The target must exist and be a regular file; folders, invalid filenames, DOS device names, and blocked extensions are not accepted.
  </ParamField>

  ## Returns

  <ResponseField name={"assetId"} type={"string"}>
    String in the form rbxasset://\<hwid>/\<workspace-relative-path> using forward slashes for the relative path.
  </ResponseField>

  ## Example

  Copy an existing workspace file into the asset folder and print the returned rbxasset path.

  ```lua theme={null}
  local path = "assets/example.txt"
  writefile(path, "asset bytes")

  local assetId = getcustomasset(path)
  print(assetId)
  print(getsynasset(path))
  ```
</div>
