I am using this in my program

for %%I in (*.txt) do (

The filenmae is in %%I.

Now i want to separate the first 2 chracters , next 3 characters , separately.

is it possible in DOS or Cmd.exe

link|improve this question

69% accept rate
feedback

1 Answer

up vote 3 down vote accepted

http://www.dostips.com/DtTipsStringManipulation.php

set first2=%%I:~0,2% && set next3=%%I:~3,3%

I think.. geez, its been a while!

link|improve this answer
Thanks mate , it worked – Mirage Feb 22 '10 at 6:20
+1 for the DosTips.com web site - cheers. – Umber Ferrule Mar 11 '10 at 9:31
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.