I have a .txt file containing D: random text and I want to select from the .txt file only the first 2 letters as the content of a variable (in CMD):
echo D: random text > C:\Users\%USERNAME%\textfile.txt
Expected:
echo %variable%
"D:"
I have a .txt file containing D: random text and I want to select from the .txt file only the first 2 letters as the content of a variable (in CMD):
echo D: random text > C:\Users\%USERNAME%\textfile.txt
Expected:
echo %variable%
"D:"