set result= for /f %%i in ('findstr hw.ramSize %userprofile%.androidavdNexus_4_API_23.avdconfig.ini%') do ( rem set getRam="%%i" rem set setRam=%ramValue% set result=%%i ) echo %result%