Expanded String = EXPAND ENVIRONMENT$( Source String )


This function will take the source string and replace every occurrence of an enviroment variable with the value of that variable.

Well known environment variables include:

Variable Contents
%SystemRoot% Windows directory
%SystemDirectory% Windows system32 directory
%temp% or %tmp% The systems temporary directory
%number_of_processors% The number of cores (hyperthreading doubles the count)
%username% The username used to log in

There are many others available.

Community content is available under CC-BY-SA unless otherwise noted.