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

Please advice how do I do it.

See More: Creating Batch Files

Report •

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


Report •
Related Solutions

Ask Question