vb.net - handing the OnCreated event of FileSystemWatcher -


i implemented event of filesystemwatcher:

private shared sub oncreated(source object, e filesystemeventargs)     if e.name.toupper() == "mytextfile.txt"         ' code '     end if end sub 

is there way monitor if created files in textbox similar this?

private shared sub oncreated(source object, e filesystemeventargs)     if e.name.toupper.contains(textbox1.text)           ' code ' end sub 

having more 1 file in multiline textbox , every filename in separate line requires should split filenames individually , check each 1 file created.

private shared sub oncreated(source object, e filesystemeventargs)      ' array of files @ each line , remove spurious empty lines     dim files() = textbox1.text.split(new string() {environment.newline}, _                                       stringsplitoptions.removeemptyentries)     dim newfile = e.name.toupper()     each file in files         if file.toupper() = newfile             ' code '             exit         end if     next end sub 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -