Hi Manuel,

First, I just want to make sure you made a typing mistake when you posted your message rather than it exists in your script. That is, when you declare $LogFile, you do not have a closing ". Make sure this is correct in your script.

I ran a quick test as follows:

shell "c:\winnt\system32\cmd.exe /c dir /b /a-d > c:\temp\dir.txt"
open (1,"c:\temp\dir.txt",2)
$x=readline(1)
? $x
while @error=0
$x = readline(1)
? $x
loop
close (1)

and it works fine. Try taking the "2>&1" out. If that doesn't work, try running the xcopy in a command window. Make sure you are specifying the correct parameters. For instance, you don't need to specify "/s /e." "/e" includes "/s." Also, if you want to maintain attributes, you need to include "/k." If you want to copy hidden and system files, include "/h." If c:\wintmp is a directory, you might want to include "/i."

Hope this helps some.

Regards,

Brad