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
Post a Comment