GetNewNameData
最后更新于
最后更新于
If a rename script is implemented using the OnGetNewName method, it receives a GetNewNameData object for each item being renamed.
custom
object:
Returns a object which provides the values of any your script added to the Rename dialog.
item
object:
Returns an 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 (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 .
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:
Returns a object representing the tab the rename operation is taking place in. If there is no tab, returns False instead.