Creating Batch Files

October 3, 2009 at 02:12:13
Specs: Dos
I have a text file and the contents of the text
file (whoami.txt) is domain/liju.

I want to create a batch file where in i would lie
to capture only the portion 'liju' from the
whoami.txt

Please advice how do I do it.


See More: Creating Batch Files

Report •


#1
October 3, 2009 at 06:53:29
@echo off & setLocal EnableDELAYedExpansion

for /f "tokens=2 delims=/" %%a in (whoami.txt) do (
set var=%%a
)
echo !var!


=====================================
Helping others achieve escape felicity

M2


Report •
Related Solutions


Ask Question