Create NTFS junction point in Python

后端 未结 5 1317
一整个雨季
一整个雨季 2020-12-05 11:02

Is there a way to create an NTFS junction point in Python? I know I can call the junction utility, but it would be better not to rely on external tools.

5条回答
  •  无人及你
    2020-12-05 11:37

    Since Python 3.5 there's a function CreateJunction in _winapi module.

    import _winapi
    _winapi.CreateJunction(source, target)
    

提交回复
热议问题