richard
Tue Nov 08 11:19:49 CST 2005
Cheers, this works like a charm!
ESP wrote:
> A simple LCase on both sides (the query and compare) would allow it to pick
> all the variants ;-)
>
> ESP
>
>
>
> "DiGiTAL SKReAM" wrote:
>
> > Option Explicit
> > Dim oFSO, sFile1, sFile2, oFile1, oFile2, sText
> > Set oFSO = CreateObject("Scripting.FileSystemObject")
> > sFile1 = "c:\file1.txt"
> > sFile2 = "c:\file2.txt"
> > Set oFile1 = oFSO.OpenTextFile(sFile1, 1)
> > Set oFile2 = oFSO.OpenTextFile(sFile2, 8)
> > Do While Not oFile.AtEndOfStream
> > sText = Trim(ofile.ReadLine)
> > If InStr(sText, "AB") <> 0 Then
> > oFile2.WriteLine sText
> > End If
> > Loop
> >
> > This will copy the line from the first file to the second file, but only
> > if the line contains the EXACT string of "AB". Ab, aB, or ab will not
> > be searched for.
> >
> > Hope this helps,
> > DS
> >
> > ---
> > Life is all about ass; you're either covering it, laughing it off,
> > kicking it, kissing it, busting it, trying to get a piece of it,
> > behaving like one, or living with one!
> >
> > *** Sent via Developersdex
http://www.developersdex.com ***
> >