def win_path_dirname(path: str) -> str:
    """Retrieve only the directory part of a Windows file path"""
    dirname = '\\'.join(path.rstrip('\\').split('\\')[:-1])
    return 'c:\\' if dirname == 'c:' else dirname