Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Velpreso
- Posts: 18
- Joined: 28 Dec 2012 10:03
#1
Post
by Velpreso » 11 Feb 2013 11:25
Hi, I would like to draw the first letter of the word TEST (T) but the script written by me is not working. Do you know how to fix it?
Code: Select all
setLocal EnableDelayedExpansion
set str=TEST
set string1=!str:~%1%!
echo %string1%
-
Squashman
- Expert
- Posts: 4486
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 11 Feb 2013 12:17
setLocal EnableDelayedExpansion
set str=TEST
set string1=%str:~0,1%
echo %string1%
-
Velpreso
- Posts: 18
- Joined: 28 Dec 2012 10:03
#3
Post
by Velpreso » 11 Feb 2013 12:37
Thanks for help but there must be:
your code showing "EST" but thanks for help, now it work as should.
-
Squashman
- Expert
- Posts: 4486
- Joined: 23 Dec 2011 13:59
#4
Post
by Squashman » 11 Feb 2013 12:38
Velpreso wrote:Thanks for help but there must be:
your code showing "EST" but thanks for help, now it work as should.
Yeah, I just realized that just before you posted. Code is fixed above.
-
Velpreso
- Posts: 18
- Joined: 28 Dec 2012 10:03
#5
Post
by Velpreso » 11 Feb 2013 13:25
I have one more question. Do you know of a script that will calculate how many letters in the word is? Or at least if it's possible?