Read-LeftString

The command copies a fixed number of characters starting at the left side of a string and stores the resulting string in a variable.


Settings:

  • String
    Character string from which characters are to be copied.
  • Number of characters to copy
    Number of characters to be copied from the string. If 0 is specified, no character is copied.
  • Store result in
    Name of the variable in which the read out substring is to be stored. Specify only the name of the variable, not the $ sign and the curly brackets.


Example:

The example determines the drive letter of the system drive (without the colon) by reading the first left character from the environment variable %SystemDrive% and storing it in the local variable _DriveLetter:


Corresponds to DSM eScript command:

  • StrLeft


See also: