Modify Windows shortcuts using Python

前端 未结 5 827
被撕碎了的回忆
被撕碎了的回忆 2020-12-09 21:46

How do you change a Windows shortcut using Python?

e.g. from:

H:\\My Music\\some_file.mp3

to:

D:\\Users\\Myself\\My         


        
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 21:53

    Yet another method is detailed here

    Use the shortcut update example. You can shortcut.GetPath(), modify it and then use shortcut.SetPath() method to set it.

提交回复
热议问题