Code: Select all
@echo off
for /f "tokens=3*" %%a in ('netsh interface show interface ^| findstr "Connected" ^| findstr "Ethernet"') do (
set "AdapterName=%%b"
)
echo %AdapterName%
Code: Select all
@echo off
for /f "tokens=3*" %%a in ('netsh interface show interface ^| findstr "Connected" ^| findstr "Ethernet"') do (
set "AdapterName=%%b"
)
echo %AdapterName%
Code: Select all
set "YourLocation=%~dp0"