from pathlib import Path


def _getname(infile):
    """
    Get file names only.

    Examples
    --------
    >>> _getname("drop/path/filename.txt")
    'filename.txt'

    >>> _getname(["drop/path/filename.txt", "other/path/filename2.txt"])
    ['filename.txt', 'filename2.txt']

    """

    if isinstance(infile, (list, tuple)):
        return [Path(f).name for f in infile]
    return Path(infile).name