import glob


def scan_files(pth, N):
    """
    Gather names of all files in given path.

    Returns: fnm, a list of strings representing the full path filename
    """
    fnm = glob.glob(pth + '/*')
    if N is not None:
        fnm = fnm[0:N]

    return fnm