hi did -o $dname 1 %b $nopath($findfile(%logsdir,*.log,%a)) can be
did -o $dname 1 %b $v2
u can use didtok with $regsubex instead of while loop