Skip to content
Antonia Elek edited this page Apr 1, 2020 · 3 revisions

Rename enables batch rename of vault structure items' aliases.

M-Files structure elements that can be renamed this way are:

  • classes
  • class groups
  • object types
  • value lists
  • value list items
  • user groups
  • named access control lists
  • property definitions
  • workflows
  • workflow states
  • workflow transitions
  • views

Configuration

Configuration file defines which vault strucrure elemnts will be renamed. It consists of three main parts:

{
  "Vault": {
    "VaultName": "Test Vault",
    "LoginType": "MFiles",
    "Username": "test",
    "Password": "test"
  },
  "CsvFiles": {
    "Classes": "your-path-here.txt",
    "UserGroups": "your-path-here.txt",
    "ObjectTypes": "your-path-here.txt",
    "ValueLists": "your-path-here.txt",
    "PropertyDefs": "your-path-here.txt",
    "Workflows": "your-path-here.txt",
    "States": "your-path-here.txt",
    "StateTransitions": "your-path-here.txt",
    "NamedACLs": "your-path-here.txt",
  },
  "CsvDelimiter": ";"
}

Each of the four configuration parts and their properties are further explained below.

Vault

Configuration part that defines connection to M-Files vault. Note that the login account used to connect to the vault should have administrative rights in order to be able to change aliases. Following properties are available.

Property Type Required Default Value
VaultName string Yes
LoginType one of:
MFiles
Windows
Yes MFiles
Domain string No
Username string No
Password string No
Protocol one of:
TcpIp
LocalProcedureCall
Spx
Https
No TcpIp
NetworkAddress string No localhost
Port int No 2266
LocalComputerName string No
EncryptedConnection bool No No

CsvFiles

Defines paths to CSV files which contain lists of elements that will be renamed. Each vault structure element type goes to its own dedicated file. For example, you will list classes to rename in CSV file specified by filepath under Classes key. In app config, you only need to specify keys and filepaths for those elements you will actually rename.

Each CSV file has the same structure. The first line always contains headers and in each subsequent line you describe an element to rename.

The following headers are supported.

Field Required
NewName Yes
ID No
Alias No
OldName No

Note that even though ID, Alias and OldName are all optional fields, at least one of them must be present in order to find vault elements to rename, either by thier ID, alias or name.

CsvDelimiter

Delimiter that is used in your CSV files.

Clone this wiki locally