Is there a way i can get single letter from one word, let's say i have a txt file on my c drive called "test.txt" and in it there is one word "dostips" no i want to get let's say the 3rd letter to be displayed on the dos screen.
could that be done ?!
how to display single letter from one word [solved]
Moderator: DosItHelp
how to display single letter from one word [solved]
Last edited by abc0502 on 03 May 2012 16:53, edited 1 time in total.
Re: how to display single letter from one word
Code: Select all
set /P word=< test.txt
echo %word:~3,1%
Re: how to display single letter from one word
thank you Aacini, it worked
it displayed the fourth letter but i get the idea i change the 3 to 2 and it do the trick thanks
it displayed the fourth letter but i get the idea i change the 3 to 2 and it do the trick thanks

Re: how to display single letter from one word [solved]
Like many programming languages counting starts from 0.
Position 0 = D
Position 1 = o
Position 2 = s
Etc
Position 0 = D
Position 1 = o
Position 2 = s
Etc