Kent,
both of you are right and i'm angry about not having discovered the bug that's
still in the code. For one or another bizarre reason the code works fine if i key in the data
manually into the stripped-result & detectdirs text files.
I was so angry on myself that i woke up at 3am and immediately fired up the laptop.
The reason why seems bizarre since the double for next loop works fine .
It seems that one of the 2 variables $stripp or $check contains a character too much
( possibly related to the dos commands i issue at the beginning of the script ).

Jens,
i'll use the code button next. If you see me forgetting it again remind me
( i tend to forget these layout things from time to time ).

I'm going to try and access the getlinecount() UDF again today ( got a server timeout
all day yesterday ) and also look for a way around my problem.