def get_copy_command_for_frames(settings, queue_com, name):
    """
    Copy the frames based on stack or frames type.

    settings - TranSPHIRE settings.
    queue_com - Queue for communication.
    name - Name of the process.

    Returns:
    Command to use for copy.
    """
    message = None
    if settings['General']['Software'] == 'EPU >1.8':
        if settings['General']['Type'] == 'Stack':
            if settings['General']['Camera'] == 'K2':
                message = '\n'.join([
                    'Stack and K2 is not supported in EPU >1.8 version',
                    'Please contact the TranSPHIRE authors!'])
            elif settings['General']['Camera'] == 'Falcon2' or settings[
                'General']['Camera'] == 'Falcon3':
                return 'rsync'
            else:
                message = '\n'.join([
                    'Camera {0} not known for Software {1} with type {2}.'.
                    format(settings['General']['Camera'], settings[
                    'General']['Software'], settings['General']['Type']),
                    'Please contact the TranSPHIRE authors!'])
        elif settings['General']['Type'] == 'Frames':
            if settings['General']['Camera'] == 'K2':
                return settings['Path']['IMOD newstack']
            elif settings['General']['Camera'] == 'Falcon2' or settings[
                'General']['Camera'] == 'Falcon3':
                message = '\n'.join([
                    'Frames and Falcon2/Falcon3 is not supported, yet.',
                    'Please contact the TranSPHIRE authors!'])
            else:
                message = '\n'.join([
                    'Camera {0} not known for Software {1} with type {2}.'.
                    format(settings['General']['Camera'], settings[
                    'General']['Software'], settings['General']['Type']),
                    'Please contact the TranSPHIRE authors!'])
        else:
            message = '\n'.join(['{0}: Unknown Type!'.format(settings[
                'General']['Type']), 'Please contact the TranSPHIRE authors!'])
    elif settings['General']['Software'] == 'EPU >1.9':
        if settings['General']['Type'] == 'Stack':
            if settings['General']['Camera'] == 'K2':
                return 'rsync'
            elif settings['General']['Camera'] == 'Falcon2' or settings[
                'General']['Camera'] == 'Falcon3':
                return 'rsync'
            else:
                message = '\n'.join([
                    'Camera {0} not known for Software {1} with type {2}.'.
                    format(settings['General']['Camera'], settings[
                    'General']['Software'], settings['General']['Type']),
                    'Please contact the TranSPHIRE authors!'])
        elif settings['General']['Type'] == 'Frames':
            if settings['General']['Camera'] == 'K2':
                message = '\n'.join([
                    'Frames and K22 is not supported in EPU >1.9',
                    'Please contact the TranSPHIRE authors!'])
            elif settings['General']['Camera'] == 'Falcon2' or settings[
                'General']['Camera'] == 'Falcon3':
                message = '\n'.join([
                    'Frames and Falcon2/Falcon3 is not supported n EPU >1.9',
                    'Please contact the TranSPHIRE authors!'])
            else:
                message = '\n'.join([
                    'Camera {0} not known for Software {1} with type {2}.'.
                    format(settings['General']['Camera'], settings[
                    'General']['Software'], settings['General']['Type']),
                    'Please contact the TranSPHIRE authors!'])
        else:
            message = '\n'.join(['{0}: Unknown Type!'.format(settings[
                'General']['Type']), 'Please contact the TranSPHIRE authors!'])
    else:
        message = '\n'.join(['{0}: Unknown Software!'.format(settings[
            'General']['Software']), 'Please contact the TranSPHIRE authors!'])
    assert bool(message is not None)
    queue_com['error'].put(message, name)
    raise IOError(message)
