要在文本文件中删除指定字符串开头的一行改怎么做?
比如现在要删除以“teststring"开头的一行,该怎么做?先谢谢了!

解决方案 »

  1.   

    open "in.txt" for input as #1
    open "out.txt" for output as #2
    dim s as string
    do while not eof(1)
      line input #1,s
      if s like "teststring*" then
        print #2,s
      end if
    loop
    close #1
    close #2
    kill "in.txt"
    name "out.txt" as "in.txt"大体就是这个意思
      

  2.   

    错了,把上面的if s like "teststring*" then改成if not (s like "teststring*") then