Create shortcut files in Windows 7 using Python

前端 未结 5 2307
无人及你
无人及你 2021-02-08 17:46

Is there a simple way to create shortcuts in Windows 7 on Python? I looked it up online but they did not seem that simple.

I have tried using this simple method:

<
5条回答
  •  耶瑟儿~
    2021-02-08 18:36

    If you looking for a platform independent version that works with Python 3 look at swinlnk.

    from swinlnk.swinlnk import SWinLnk
    swl = SWinLnk()
    swl.create_lnk('W:\Foo\Bar', '/mnt/win_share/playground/Bar_winlink.lnk')
    

    This python script is based on the C / Bash Tool mslink.

提交回复
热议问题