set a=file
if exist "folder\%a%" (
set /p x= < "folder\%a%"
echo %x%
)
i've been writing batch files for a long time, but i don't get it why this code does not work. Im expecting the code to echo out the content of the %a%. but all it returns is the status of ECHO (Echo is ON)
the %a% (file) contains a string ('keyword') which is expected to be echoed out when set in %x%
i even tried to put an extension (.txt) but still it does not work