Hi there,
I'm currently creating a batch in windows (10) to export info to a csv file.
The command i need to expert is:
NETSH WLAN SHOW INTERFACE
I write this info to a TXT file
I get an output like this:
Name : Wi-Fi
Description : Intel(R) Centrino(R) Ultimate-N 6300 AGN
GUID : 91a6ebce-01cf-4d36-87ab-1e630893718a
Physical address : 3c:a9:f4:09:fb:9c
State : connected
SSID : WiFi_2.4_MP
BSSID : e2:b9:e5:e1:5c:7e
Network type : Infrastructure
Radio type : 802.11n
Authentication : WPA2-Personal
Cipher : CCMP
Connection mode : Profile
Channel : 44
Receive rate (Mbps) : 150
Transmit rate (Mbps) : 150
Signal : 72%
Profile : WiFi_2.4_MP
I only want the info behind the ":" , the results...
So i'm using this script to delete them:
set "a1= Name : "
set "b1= Description : "
set "c1= GUID : "
set "d1= Physical address : "
FOR /f "delims=" %%a IN (config.log) DO (
set b=%%a
echo !b:%a1%=!>>configa1.tmp
)
FOR /f "delims=" %%a IN (configa1.tmp) DO (
set b=%%a
echo !b:%b1%=!>>configb1.tmp
)
FOR /f "delims=" %%a IN (configb1.tmp) DO (
set b=%%a
echo !b:%c1%=!>>configc1.tmp
)
FOR /f "delims=" %%a IN (configc1.tmp) DO (
set b=%%a
echo !b:%d1%=!>>configd1.tmp
This all works well until the script gets to the following line:
set "n1= Receive rate (Mbps) : "
set "o1= Receive rate (Mbps) : "
FOR /f "delims=" %%a IN (configm1.tmp) DO (
set b=%%a
echo !b:%n1%=!>>confign1.tmp
)
FOR /f "delims=" %%a IN (confign1.tmp) DO (
set b=%%a
echo !b:%o1%=!>>configo1.tmp
)
The reason is the text (Mbps), i manage to remove (Mbps, but from the moment i add ")" the script crashes.
I can't find out how to fix it.
Anyone with a golden tip to get me true the last part?
Greetings