I am trying to cut string in a file using the below code:
for %%i in (file.txt) do @set num=%%~zi
FOR /F "tokens=*" %%G IN (file.txt) DO (
CALL SET P=%%G:~%num%,4%
echo (%P%)
)
What I am doing is counting number of characters and cut only last 4 characters in the file having that file always have one line only.
But I only get this output: ~151,4
what can i do ?