Jens,
i agree too but what i mean was that i was going to look into the proposed code and
adapt my version. When writing this 'cosmetics' comment i was in the middle of ammending.
It works now so i'm off browsing through the UDF's to supress the 0000's. It might take a while
before i get this suppression running since it's a feature i haven't used yet.

I'll post the uncleaned version further down this topic ( someone might find it usefull
for his or her problem ).

Edwin

SHELL 'CMD /C DEL u:\FS-Compare\detectdirs.txt'
SHELL 'CMD /C DIR \\serverA\pathA$\*.* /AD /B >> u:\FS-Compare\detectdirs.txt'
SHELL 'CMD /C DIR \\serverB\pathB$\*.* /AD /B >> u:\FS-Compare\detectdirs.txt'
SHELL 'CMD /C DEL u:\FS-Compare\rmtshare.txt'
SHELL 'CMD /C RMTSHARE \\serverB >> u:\FS-Compare\rmtshare.txt'

open(1,"u:\FS-Compare\stripped-result.txt",5)
open(2,"u:\FS-Compare\rmtshare.txt")
open(3,"u:\FS-Compare\detectdirs.txt")
open(4,"u:\FS-Compare\problem-log.txt",5)

$line = readline(2)
$mxcount1 = 0
$mxcount2 = 0
$check = readline(3)

while @ERROR = 0
IF INSTR($line,"pathB\") OR INSTR($line,"pathA\")
$MyArray = split($line,"$")
WriteLine( 1 , $myarray[0] + @CRLF)
ENDIF

$line = readline(2)
loop

close(1)
close(2)

open(5,"u:\FS-Compare\stripped-result.txt")
$stripp = readline(5)

while @ERROR = 0

$buildmx1array = $stripp
$stripp = readline(5)
$mxcount1 = $mxcount1 + 1
loop

close(5)

while @ERROR = 0

$buildmx2array = $stripp
$check = readline(3)
$mxcount2 = $mxcount2 + 1
loop

close(3)

open(6,"u:\FS-Compare\stripped-result.txt")
$stripp = readline(6)
open(7,"u:\FS-Compare\detectdirs.txt")
$check = readline(7)

? "There are " + $mxcount1 + " shares and " + $mxcount2 + " directories"
writeline(4,"There are " + $mxcount1 + " shares and " + $mxcount2 + " directories" +@CRLF )

FOR $count1 = 1 TO $mxcount1 STEP 1
$trigger = 0
FOR $count2 = 1 TO $mxcount2 STEP 1
IF INSTR($tripp,$check)
$trigger = $trigger + 1
$check = readline(7)
ENDIF
NEXT
IF $trigger = 0
WriteLine(4, @CRLF + $stripp + " cannot be linked to an existing directory " + @CRLF)
ENDIF
$stripp = readline(6)
NEXT

close(4)
close(6)
close(7)

That's it for the uncleaned version. The cleaned up one will come in a while.
Note that i used some generic servernames & pathnames . The boss wouldn't have liked
it if i had left the complete path & exact servernames in it.