I'm not sure I understand everything you're wanting to do. But something like this may be what you're wanting.
Code:
on *:TEXT:!logs:?:{
  echo 1 $findfile($mircdirlogs,*.*,0,msg $nick log name: $nopath($1-) - number of lines: $lines($1-) ) 
}

The usage would be someone messaging you with !logs and in return it would show them the name of all the logs in your logs folder, and how many lines are in each file. I used $nopath() so that if only shows the name of the file itself, and not the entire directory. Hope this is what you're asking for, if not, please explain in further detail. Thanks.