you can skip a step by using WSHPipe(). This will take the output from XXCOPY, and pipe it straight into an array with out having to mess with a temp file.

Or if you are wanting to read a temp fine into an array, their are a few UDF's that will do that as well.

here is a sample of one that i use that uses the FSO.

Code:

;this Function will load the contents of a text file into an array
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




so...how you would use it is like this.


Code:

for each $line in LoadFile("c:\output.txt")
? $line
next




Working with arrays are easy, and once you grasp them, almost become second nature.