That's a point! I have tried when running my tests using: open(1,"c:\delete.txt") but this still does not work and I have fixed the little errors the script now looks like this:------------------------------------------
if exist c:\del.chk goto end
endif
if exist c:\autoexec.bat copy c:\autoexec.bat c:\del.chk
$auto=""
open(1,"c:\autoexec.bat")
$line=readline(1)
while @ERROR=0
$auto=$auto+$line
$line=readline(1)
loop
$null=close(1)
$delstuff=""
open(1,"c:\delete.txt")
$line=readline(1)
while @ERROR=0
$delstuff=$delstuff+$line
$line=readline(1)
loop
$null=close(1)
$newaut=$auto+$delstuff
open( 2 ,"c:\autotest.bat" , 1)=0
$x = WriteLine( 2 , $newaut )
close (2)
ENDIF
:end
--------------------------------------------
The problem is I am getting script failure errors that are too fast to read. When performing a call what file type should this be? If I save the above to a batch file and run it it I get errors.