I want to write a batch file that will contain the contents of the file, and replace any references to the environment variables inside the file with the actual values of the environment variables. Is it possible? Basically, if the file had this:
%PROGRAM FILES%\Microsoft SQL Server\
then I would like the contents of the file to become:
C:\Program Files\Microsoft SQL Server\
after running the batch script. This is just one example, but I want ALL environment variables to be extended. Thanks in advance for your help!
source
share