J
James
I've open a file and read the file into arraylist. My text file contents are
a.txt=a.bat
b.txt=b.bat
c.txt=c.bat
i want to do a select case statement for filewatcher, if a.txt is created,
execute a.bat and etc etc I do not wish to hard-code all possible *.txt file
in my select case statements ...i thought of the script below. Pls advise
syntax
***********************************************
dim myitem as new arraylist
'open a file, and stored into array.
myitem.add(lines)
Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e As
System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
select case e.name
'this is normally what i do
case "a.txt"
process.start("a.bat")
'say if c.txt file is created, how can i do a search into my
arraylist and then execute the batch file ?
'i do not wish to hard-code it for every text files.
case substr(myitems) or case instr(myitems) ...i m stuck here
end sub
a.txt=a.bat
b.txt=b.bat
c.txt=c.bat
i want to do a select case statement for filewatcher, if a.txt is created,
execute a.bat and etc etc I do not wish to hard-code all possible *.txt file
in my select case statements ...i thought of the script below. Pls advise
syntax
***********************************************
dim myitem as new arraylist
'open a file, and stored into array.
myitem.add(lines)
Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e As
System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
select case e.name
'this is normally what i do
case "a.txt"
process.start("a.bat")
'say if c.txt file is created, how can i do a search into my
arraylist and then execute the batch file ?
'i do not wish to hard-code it for every text files.
case substr(myitems) or case instr(myitems) ...i m stuck here
end sub