def GetFilePathsWithDialog(fileTypes=[]):
    """
        Multipul File Select with dialog

        fileTypes: you can choise file extension
            ex) fileTypes=[('Excel Files', '.xlsx')]
    """
    root = tkinter.Tk()
    root.withdraw()
    filepath = filedialog.askopenfilenames(
        filetypes=fileTypes, parent=root)

    if isinstance(filepath, str):
        fileList = filepath.split(" ")
    elif isinstance(filepath, tuple):
        fileList = list(filepath)
    elif isinstance(filepath, list):
        fileList = filepath

    root.destroy()
    print(str(len(fileList)) + " files are selected")

    return fileList
def GetFilePathsWithDialog ( fileTypes = [ ] ) : root = tkinter . Tk ( ) root . withdraw ( ) filepath = filedialog . askopenfilenames ( filetypes = fileTypes , parent = root ) if isinstance ( filepath , str ) : fileList = filepath . split ( " " ) elif isinstance ( filepath , tuple ) : fileList = list ( filepath ) elif isinstance ( filepath , list ) : fileList = filepath root . destroy ( ) print ( str ( len ( fileList ) ) + " files are selected" ) return fileList
Multipul File Select with dialog

        fileTypes: you can choise file extension
            ex) fileTypes=[('Excel Files', '.xlsx')]