Posted by Valerie on October 01, 2011 at 20:46:56:
In Reply to: Re: dos posted by Valerie on October 01, 2011 at 20:37:20:
Previous response amended to alter the If compare
=================================================
@echo off>text.file
SETLOCAL ENABLEDELAYEDEXPANSION
cls
set ex3=the current user logged
set ex5=there is no current user logged
for /f "tokens=*" %%a in (makfi.txt) do (
set foo=%%a
if /i "!foo:~2,23!" equ "!ex3!" (set foo=!ex5!)
echo !foo! >> text.file
)