Purpose:Remove array variables

 

Format:UNSETARRAY [/Q] name [name...]

or

UNSETARRAY *

 

nameOne or more array variables to remove (wildcards accepted).

 

/Q(uiet)

 

See also: SETARRAY.

 

Usage:

 

UNSETARRAY removes one or more array variables.

 

For more information on array variables, see the SETARRAY command.

 

Examples:

 

To remove the array variable ARRAY1:

 

unsetarray array1

 

If you use the command UNSETARRAY *, all of the array variables will be deleted:

 

unsetarray *

 

You can delete all matching array variables except for those specified by enclosing the exceptions in parentheses. For example, to remove all array variables beginning with "v" except for var1 and var2:

 

unsetarray (var1 var2) v*

 

Options:

 

/QPrevents UNSETARRAY from displaying an error message if one or more of the array variables do not exist. This option is most useful in batch files, for removing a group of arrays when some of the arrays may not have been defined.