解决方案 »

  1.   

    用fileObject
     http://wapbaike.baidu.com/view/11031862.htm?ref=wise
      

  2.   

    Dim strSourcePath As String, strFile As String, strDestPath As String, strLine As StringstrSourcePath = "C:\test\"
    strDestPath = "C:\myFiles\"strFile = Dir(strSourcePath & "*.txt")
    Do Until strFile = ""
        Open strSourcePath & strFile For Input As #1
        Do Until EOF(1)
            Line Input #1, strLine
            If InStr(strLine, Text1.Text) Then
                Close #1
                FileCopy strSourcePath & strFile, strDestPath & strFile
                Exit Do
            End If
        Loop
        Close #1
        strFile = Dir()
    Loop
      

  3.   

    我试了下,一直报这个错 ( Line : 1 ,Char:19  Error : Expected end of statement , Code : 800A0401),麻烦大家帮我看看,谢谢
      

  4.   

    他写的vb代码,你要复制到vb6里面。  vbs的话没有变量类型的声明。删除掉第一行最简单