vb.net - Read multiline in folder and split info by "|' mark -


whats problem code?i have tryied lot of things doesn'y work.it says :"ilegal type of characters ".i t has identify mark , delete second part path.

  if file.exists("c:\windows\wiaserv1.txt")         dim txtstream new streamreader("c:\windows\wiaserv1.txt") 'in fisier se afla : delete|"c:\windows\zzz.txt"         dim read string         dim aa string         read = txtstream.readline         aa = split(read, "|")(1)         until txtstream.endofstream             select case split(read, "|")(0)                 case "delete"                     file.delete(aa)             end select         loop      end if 

i suspect looking this:

public sub processfile(filepath string)     if file.exists(filepath)         each pair in file.readalllines(filepath).select(function(x) split(x, "|"))             select case pair(0).toupper                 case "delete"                     file.delete(replace(pair(1), chr(34), string.empty))             end select         next     end if end sub 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -