Skip to content

hkb_editor.gui.dialogs.file_dialog

choose_folder

choose_folder(title: str = 'Select folder', start_dir: str = None) -> str

Open a folder selection dialog using the modern Windows IFileOpenDialog COM interface, which provides the full Explorer-style experience including drive switching, network locations, favourites, and the ability to create new folders.

Args: title (str, optional): The title of the folder selection dialog. Default is 'Choose a folder' start_dir (str, optional): The starting directory for the dialog.

Returns: str: The selected folder's path, or None if the dialog was cancelled.

Example: result = choose_folder(title="Choose folder", start_dir="C:/Documents")

Ko-fi donations