//.lck file should be filtered out. if (fileName.indexOf( ".lck" ) != -1 ) return false; if( fileName.indexOf( ".log" ) != -1 ) return true; return false;