Hi,
how can I take this file (contents of file between "") named c:\users\public\desktop\wifi.txt
"
Profiles on interface Wi-Fi:
User profiles
All User Profile : Telstra79CA5B-5G
All User Profile : Telstra79CA5B
All User Profile : NETGEAR80-5G
All User Profile : NETGEAR80
" and turn the file into or create new file from old file with following content only?
"
Telstra79CA5B-5G
Telstra79CA5B
NETGEAR80-5G
NETGEAR80
"
then display each line on 4 seperate labels?

Manoj BhoirPosted Jul 19, 2015, 1:53 AM
List<string> userProfile = new List<string>();
foreach (string line in fileContents)
{
if (line.Contains("All User Profile"))
{
userProfile.Add(line.Substring(line.IndexOf(":") + 2));
}
}
File.WriteAllLines(" c:\users\public\desktop\wifi-new.txt", userProfile);
label1.Text = userProfile[0];