code:

BREAK ON
;Assuming NT use %comspec% if mixed 9x/NT

$server = "\\mightymouse"
$share = "C$"
$file = file.ext

shell "cmd /c dir $server\$share /ad/b > dirlist.txt"

OPEN (1, "dirlist.txt")
$dir = readline (1)

WHILE @ERROR = 0
copy "$file" "$server\$share\$dir\"
$dir = readline (1)
LOOP

:cleanup

del dirlist.txt


This dumps a bare list of directories to a file. The file is then opened by kix and each line is read in. A file is copied to each direcitory. It does this until it cannot read any more lines from the dirlist.txt file (until @error is not 0).

[This message has been edited by JasonC (edited 14 June 2001).]