On Monday, May 6, 2013 1:04:35 AM UTC-4, foxidrive wrote:
> Do you mean using setlocal so that the variables are cleared when the batch file ends? This style works - the endlocal is optional as it is implied when a batch file ends. @echo off setlocal set var=abc rem code goes here echo %var% endlocal echo."%var%" pause -- foxi
Thank you for the setlocal keyword. I have another issue, also. When I was writing this batch file, I wrote some test lines to determine that I got the date format right. When I did so, I forgot to remove the test lines. Therefore, when the file runs, it will display the date and pause. To remove this behavior, you should remove the following lines from the batch file:
echo %date2%
pause
That's all.