I'm trying to write a script (under Win2k) that will write the attribute number of every file on a drive to one single text file. After the script runs awhile, it displays:

"Script Error: failed to find/open script"

The "FOR" command is also causing a problem. It only wants to go one level deep.

Does anyone know how to get kixtart to walk the directory tree (similar to a DIR /S) and perform a command for each directory?

I'm also concerned that writing a script that calls itself will hang after going a few levels deep.

I've been tring to launch the script with:

M:\> for /d %x in (*.*) do kix32 c:\fattrib.kix ".\%x"

Contents of fattrib.kix are as follows:

BREAK ON
$Dir = "%1"
$File = Dir( $Dir + "\*.*" )
WHILE @ERROR = 0 AND $File
$attribute = GetFileAttr($Dir + "\" + $File)
IF REDIRECTOUTPUT("c:\attributes.txt",0)=0
? $attribute
chr(59)
$Dir + "\" + $File
ENDIF
IF @ERROR = 0
; try for next subkey
$File = Dir("")
ENDIF
LOOP
EXIT 0