获取Python中的文件夹图标

huangapple go评论107阅读模式
英文:

Get folder icon in python

问题

有没有办法获取文件夹图标(Windows 10)?

我需要使用Python获取文件夹图标的文件/链接/路径。

找到了如何更改图标的方法,但我没有找到如何获取它的方法。

我找不到可以解决这个问题的包。
有人知道如何在Python中做到这一点吗?

英文:

Is there any way to get a folder icon (Windows 10)?

I need to get the file/link/path to the folder icon with Python

I found how to change the icon, but I didn't find how to get it

I could not find packages to solve this problem.
Does anyone know how to do this with Python?

答案1

得分: 1

系统图标,包括文件夹图标,存储在以下 DLL 中:%systemroot%\system32\imageres.dll(图标位置

您可以尝试使用 Python 包 icoextract 提取这些图标。

英文:

The system icons including the folder icon are stored in the following dll %systemroot%\system32\imageres.dll (icon locations)

You could try extracting these icons using the python package icoextract

huangapple
  • 本文由 发表于 2023年7月3日 05:02:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76600793.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定