Я пытаюсь прочитать целевой файл/каталог файла ярлыка (.lnk
) из Python. Есть ли способ, облегчающий головную боль? . Lnk spec [PDF] - это над моей головой.
Я не против использовать только Windows-API.
Моя конечная цель - найти папку "(My) Videos"
в Windows XP и Vista. В XP по умолчанию он находится в %HOMEPATH%\My Documents\My Videos
, а в Vista - %HOMEPATH%\Videos
. Однако пользователь может переместить эту папку. В случае, папка %HOMEPATH%\Videos
перестает существовать и заменяется на %HOMEPATH%\Videos.lnk
, которая указывает на новую папку "My Videos"
. И я хочу его абсолютное местоположение.