0
1
when I'm using the netsh wlan command, a similarly output is shown.
C:\Windows\system32>netsh wlan show profiles
Profiles on interface Wireless Network Connection:
Group policy profiles (read only)
---------------------------------
<None>
User profiles
-------------
All User Profile : WLAN-313131
All User Profile : FRITZ!Box Fon WLAN 7170
I want to write all profiles from this output into a text-file, without all information/text around it.
The output for out.txt
should look like:
WLAN-313131
FRITZ!Box Fon WLAN 7170
Is that possible with a script language like batch, to split or filter information, so it fits to my requested output?
You can output the results of the command to a text file by appending > out.txt to the command. It would look like: netsh wlan show profiles > out.txt as far as parsing the information out of there, I would write my batch file to search for the known string "All User Profile" and then have it append the characters after into an array. That array could then be used to create your file of names. I know that this isn't the programming help you are looking for, but the output of the command is a start. – JamesTheDev – 2013-10-30T18:58:52.827
That was my first consideration as well, but I'm looking for a smart solution at script-level. As a last resort I could write a little c#-program that does it for me. – MrMAG – 2013-10-30T19:51:41.257
That is what I was thinking I would do. C# has the ability to do this very easily. – JamesTheDev – 2013-10-30T22:25:32.423