Click here to Skip to main content
15,898,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRunning an app/process withing my vb.net app Pin
y2ktheory7-Jul-07 15:17
y2ktheory7-Jul-07 15:17 
AnswerRe: Running an app/process withing my vb.net app Pin
Christian Graus7-Jul-07 15:48
protectorChristian Graus7-Jul-07 15:48 
GeneralRe: Running an app/process withing my vb.net app Pin
y2ktheory7-Jul-07 16:20
y2ktheory7-Jul-07 16:20 
GeneralRe: Running an app/process withing my vb.net app Pin
Christian Graus7-Jul-07 16:40
protectorChristian Graus7-Jul-07 16:40 
GeneralRe: Running an app/process withing my vb.net app Pin
y2ktheory7-Jul-07 16:52
y2ktheory7-Jul-07 16:52 
GeneralRe: Running an app/process withing my vb.net app Pin
Christian Graus7-Jul-07 16:57
protectorChristian Graus7-Jul-07 16:57 
QuestionDesign time tasks for custom controls Pin
The ANZAC7-Jul-07 15:14
The ANZAC7-Jul-07 15:14 
Questionfind names in a directory Pin
sextonk7-Jul-07 11:27
sextonk7-Jul-07 11:27 
Sniff | :^) I am very new to vb. I am trying to write an program which searches through all the word docs. in a directory.
I have a list of 20 stirngs I am looking for. I am sure only 1 of the strings is found in each file.

I have tried to write this several diferent ways but none works. I think I need two arrays and to loop through both and output the found strings, file names, and dates of the files to a spreadsheet.

Any help would be greatly appreciated.


Public Class Form1

'Create a list of doctors as an array.

'Create a list of files in the remote folder as an array

'Loop thru the “files array” and look for each doctor

'Write the doctor name, filedate, sysdate, and file name to a spreadsheet

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

' For Each strFile As String In My.Computer.FileSystem.Getectories("C:\batch")

'Add the item to the list

'ListBox1.Items.Add(strFile)

'If String.Compare(strDoc) Then

Dim doc1 As String = "ledford"



Dim list As System.Collections.ObjectModel.ReadOnlyCollection(Of String)

list = My.Computer.FileSystem.FindInFiles("C:\batch", doc1, True, FileIO.SearchOption.SearchTopLevelOnly)

For Each name As String In list

ListBox1.Items.Add(name)

Next

'End If

''''''Assign the files found in the list above as a variable and replace for file1.log

'Dim information As System.IO.FileInfo = My.Computer.FileSystem.GetFileInfo("C:\batch\file1.log")

'MsgBox("The file's full name is " & list.FullName & ".")

'MsgBox("Last access time is " & list.LastAccessTime & ".")

' Next

End Sub

'Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

' Dim arrayDocs (of string)

' arrayDocs(0) = "sexton"

' arrayDocs(1) = "wargo"

' arrayDocs(2) = "ledford"

' arrayDocs(3) = "koepke"

' For Each strDoc As String In arrayDocs

' ListBox2.Items.Add(strDoc)

' Next

'End Sub

End Class




-Kevin
AnswerRe: find names in a directory Pin
TwoFaced7-Jul-07 15:30
TwoFaced7-Jul-07 15:30 
Questionhow to control the parallel port using visual basic? Pin
meki_21187-Jul-07 7:29
meki_21187-Jul-07 7:29 
AnswerRe: how to control the parallel port using visual basic? Pin
Luc Pattyn7-Jul-07 8:41
sitebuilderLuc Pattyn7-Jul-07 8:41 
QuestionMAPIMessages1.Fetch from a different folder Pin
EvScott7-Jul-07 7:20
EvScott7-Jul-07 7:20 
Questiondatagridview Row provided already belongs to a DataGridView control Pin
balakpn6-Jul-07 23:07
balakpn6-Jul-07 23:07 
Questiondeveloping mutiuser Application(urgent) Pin
prasadbuddhika6-Jul-07 23:01
prasadbuddhika6-Jul-07 23:01 
AnswerRe: developing mutiuser Application(urgent) Pin
Ajai Chaudhary6-Jul-07 23:17
Ajai Chaudhary6-Jul-07 23:17 
Questionprotection with CD Key Pin
Ajai Chaudhary6-Jul-07 21:10
Ajai Chaudhary6-Jul-07 21:10 
AnswerRe: protection with CD Key Pin
Paul Conrad13-Jul-07 12:32
professionalPaul Conrad13-Jul-07 12:32 
Questionhow can i import data from excel to sqlserver using vb6.0 Pin
koolprasad20036-Jul-07 21:01
professionalkoolprasad20036-Jul-07 21:01 
AnswerRe: how can i import data from excel to sqlserver using vb6.0 Pin
ips_sun6-Jul-07 21:23
ips_sun6-Jul-07 21:23 
Questionneed code to find serial number of hard, mainboard and cpu please Pin
omidreza8126-Jul-07 20:13
omidreza8126-Jul-07 20:13 
QuestionTo develop Windows applications to support an number of languages. Pin
Hari Prasad Karnam6-Jul-07 20:13
Hari Prasad Karnam6-Jul-07 20:13 
AnswerRe: To develop Windows applications to support an number of languages. Pin
Tom Deketelaere8-Jul-07 21:26
professionalTom Deketelaere8-Jul-07 21:26 
Questioncrystal report Pin
d_smit6-Jul-07 19:41
d_smit6-Jul-07 19:41 
QuestionVB.Net Sockets [modified] Pin
calebcohoon6-Jul-07 13:03
calebcohoon6-Jul-07 13:03 
AnswerRe: VB.Net Sockets Pin
MidwestLimey9-Jul-07 9:24
professionalMidwestLimey9-Jul-07 9:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.