|
Dummy me. It was creating the Out file. I was just looking for it in wrong place. Now, when I execute script, i am getting:
Script error: expected sxpression If AScan($fileb$ssn,1,9)+1
Here is my code:
cls $fileA = loadfile("c:\ftp\ssn.txt") $fileb = loadfile("c:ftp\data.txt") $filec = Open(1,"c:\ftp\outdata.txt",5)
For Each $line In $filea $ssn = substr($line,1,9)
For Each $line In $filea If AScan($fileb,$ssn,1,9)+1 ? "A SSN In file b was found In file a, writting the line To file c" $ = WriteLine(1,$line+@CRLF) EndIf
Next ? "DONE - Press any key to exit" get $ Function loadfile($file) DIM $fso,$f,$fs $fso = CreateObject("Scripting.FileSystemObject") $f = $fso.GetFile($file) If @ERROR Exit(2) EndIf $fs = $f.OpenAsTextStream(1) $loadfile = Split($fs.Read($f.size),@CRLF) Exit(@ERROR) EndFunction
|