C:Usersxxx>@echo off rem This is for listing down all the files in the directory Program files dir "c:Program Files">c:lists.txt echo "The program has completed"
@echo off
set globalvar=5
SETLOCAL
set var=13145
set /A var=%var% + 5
echo %var%
echo %globalvar%
ENDLOCAL
echo %var%
echo %globalvar%
pause
@echo off set Arr[0]=1 set Arr[1]=2 set Arr[2]=3 set Arr[3]=4 set "x=0" :SymLoop
if defined Arr[%x%] ( call echo %%Arr[%x%]%% set /a "x+=1" GOTO :SymLoop ) echo "The length of the array is" %x%