There is a file with lines:

// ...
// ...
//

// ...

'r3690'

I need to read the last line, which successfully does:

for /F "delims=" %%i in (myfile.inc) do set "xprvar=%%i" 

The xprvar variable remains 'r3690'

Now I need to trim the first and last characters ' . How to do it in BAT file?

    1 answer 1

    Just run the line:

     SET verinfo2=%verinfo:'=% 

    Which will replace the ' on empty. The result is the desired string.