1

If I had the following code:

set alpha=abcdefghijklmnopqrstuvwxyz

What would I have to do to %alpha% in order to result in only a, b, c, . . ., z?

1
  • Isn't it already only a, b, c, ..., z? Commented Aug 5, 2011 at 12:19

1 Answer 1

5

If you want to access it via the position you need

set alpha=abcdefghijklmnopqrstuvwxyz
echo %alpha:~0,1%
echo %alpha:~1,1%
echo %alpha:~2,1%
echo %alpha:~25,1%

Explained at set /?

Sign up to request clarification or add additional context in comments.

2 Comments

@Whef: Please take into account that it is possible (and is greatly encouraged) to formally accept the answer that has worked for you.
Sorry about that, didn't realize what that check was for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.