g00dknight
New member
- Joined
- Feb 20, 2011
- Messages
- 3
- Programming Experience
- Beginner
Hey everyone,
I'm currently writing an application but I've hit a wall.
Currently, my application will send the contents of a directory into a list box.
For now, all that is inside the directory is a text file.
I would like my program to read the contents of the text file and remove a set of common words, but I don't really know how to move forward here.
Forgive me for I am a beginner, but would it be best to create a class that holds a set of words that I would like to remove, then loop through the text file, remove any words that match those inside my class and then write what's left to a new .txt file?
Could someone lend a hand here?
Thanks in advance!
I'm currently writing an application but I've hit a wall.
Currently, my application will send the contents of a directory into a list box.
VB.NET:
Dim folderDlg As New FolderBrowserDialog
folderDlg.ShowNewFolderButton = True
If (folderDlg.ShowDialog() = DialogResult.OK) Then
ListBox1.Text = folderDlg.SelectedPath
Dim di As New IO.DirectoryInfo(folderDlg.SelectedPath)
Dim myFileInfoArray As IO.FileInfo() = di.GetFiles()
ListBox1.ValueMember = "FullName"
ListBox1.DataSource = myFileInfoArray
ListBox1.DisplayMember = "Name"
End If
For now, all that is inside the directory is a text file.
I would like my program to read the contents of the text file and remove a set of common words, but I don't really know how to move forward here.
Forgive me for I am a beginner, but would it be best to create a class that holds a set of words that I would like to remove, then loop through the text file, remove any words that match those inside my class and then write what's left to a new .txt file?
Could someone lend a hand here?
Thanks in advance!