Solved how to use remove letter command in batch file

October 13, 2012 at 09:30:49
Specs: Windows 7
how to use remove letter command in batch file
give me example

See More: how to use remove letter command in batch file

Report •


#1
October 13, 2012 at 10:16:41
✔ Best Answer
Here you go:
set strings=123456789
--------------------
Remove last 5 letters:
set strings=%strings:~0,-5%
--------------------
--------------------
Remove first 2 letters:
set strings=%strings:~2%
--------------------

--------------------
Extract last 2 characters
set strings=%strings:~-2%
--------------------

--------------------
Extract first 2 characters:
set strings=%strings:~0,2%
--------------------


Report •
Related Solutions


Ask Question