def pcap_analysis_multi(pretty, folder_path):
    """Analyze whole folder of pcaps. Output json saved next to
    original pcap."""

    # get pcap paths
    full_path = os.path.abspath(folder_path)
    pcaps = glob.glob(f'{full_path}/**/*.pcap', recursive=True)

    number_of_pcaps = len(pcaps)
    log.info(f'Starting analysis of {number_of_pcaps} pcaps.')

    # analyze pcaps
    for i, pcap_path in enumerate(pcaps):
        log.info(f'Starting analysis of {pcap_path}.')
        log.debug('Creating analyzer.')
        pcap = AnalyzedPcap(pcap_path)
        analyzer = NetworkAnalyzer(None, pcap.path, None)

        log.debug('Calling analyze_pcap().')
        analyzer.analyze_pcap()

        # set output path
        dir_name = pcap.dir
        if not dir_name.endswith('/'):
            dir_name += '/'

        file_name = f'network.{pcap.name}.json'
        output_file = dir_name + file_name

        output = pcap.output
        output['network_analysis'] = analyzer.output
        save_output(output, output_file, pretty)

        log.info(f'Analyzed {i+1}/{number_of_pcaps} pcaps.')
Analyze whole folder of pcaps. Output json saved next to
    original pcap.
lisa/manage.py