Click here for important information about

Remove weird rectangle at end of line

Acer Aspire 5920g
August 15, 2010 at 00:37:19
Specs: Microsoft Windows 7 Professional, 2.201 GHz / 2046 MB
Hello guys i ran the code to remove spaces for the ipconfig command and i met this problem whereby theres an invisible rectangle after .134..i am wondering how to solve this..thanks in advance:)

IPAddress............:[]-< weird rectangle

SETLOCAL EnableDelayedExpansion
IPCONFIG | findstr /C:"IP Address" >> IPCONFIG.txt

for /f "delims=" %%a in (IPCONFIG.txt) do (
set line=%%a
set line=!line: =!
echo !line! >> IPCONFIGNS.txt

FOR /f "tokens=2 delims=:" %%a IN (IPCONFIGNS.txt) DO (
SET IP=%%a

See More: Remove weird rectangle at end of line

August 15, 2010 at 05:32:11
for /f "tokens=15" %%a in ('ipconfig ^| findstr "Address"') do @echo %%a

Report •

August 15, 2010 at 07:17:18
ahh still gives me that weird rectangle man..

Report •

August 15, 2010 at 07:36:25
If I remember correctly it's a surplus CR(0x0Dh), you can get rid of it by using:

set line=!line:0,-1!


call :sub !line!
goto :eof

set line=%1
goto :eof

Report •
Related Solutions

Ask Question