# GetNewNameData

If a [rename script](../../../scripting/rename_scripts) is implemented using the [**OnGetNewName**](../scripting_events/ongetnewname) method, it receives a **GetNewNameData** object for each item being renamed.

| Property Name    | Return Type                                   | Description                                                                                                                                                                                                                              |
| ---------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| custom           | object:[**CustomFieldData**](customfielddata) | Returns a [**CustomFieldData**](customfielddata) object which provides the values of any [custom fields](../../../scripting/rename_scripts/custom_fields_in_the_rename_dialog) your script added to the _Rename_ dialog.                 |
| item             | _object:_[**Item**](item)                     | Returns an [**Item**](item) object representing the file or folder being renamed.                                                                                                                                                        |
| newname          | _string_                                      | Returns the proposed new name of the item. This will be the result of the application of any selected standard options in the [rename dialog](../../../file_operations/renaming_files/advanced_rename) (numbering, capitalization, etc). |
| newname\_ext     | _string_                                      | Returns the file extension of the proposed new name. Does not take multi-part extensions into account (e.g. will return ".rar" rather than ".part1.rar").                                                                                |
| newname\_ext\_m  | _string_                                      | Returns the file extension of the proposed new name, taking multi-part extensions into account (e.g. will return ".part1.rar" rather than ".rar").                                                                                       |
| newname\_field   | _string_                                      | Returns the contents of the _New Name_ field (that is, not the calculated new name after all the options have been applied, but the actual text contents of the field as entered by the user).                                           |
| newname\_stem    | _string_                                      | Returns the file stem of the proposed new name. Does not take multi-part extensions into account (e.g. will return "catpictures.part1" rather than "catpictures").                                                                       |
| newname\_stem\_m | _string_                                      | Returns the file stem of the proposed new name, taking multi-part extensions into account (e.g. will return "catpictures" rather than "catpictures.part1").                                                                              |
| oldname\_field   | _string_                                      | Returns the "old name" pattern as entered by the user in the [rename dialog](../../../file_operations/renaming_files/advanced_rename).                                                                                                   |
| preview          | _bool_                                        | Returns **True** if the script is being called to generate a preview for the rename dialog, **False** if the file is being renamed for real.                                                                                             |
| tab              | _object:_[**Tab**](tab)                       | Returns a [**Tab**](tab) object representing the tab the rename operation is taking place in. If there is no tab, returns **False** instead.                                                                                             |
