我想從具有分佈式文件系統體系結構的Windows網絡位置獲得類似ping的響應,例如,在Python中獲取網絡位置的DFS路徑
path = r'\\path\to\some\shared\folder_x'
delay = ping_func(path)
print delay # return response in milliseconds ?
234
一旦我有主機,我可以輕鬆地ping位置。
我可以通過查看Windows資源管理器中的DFS選項卡來確定folder_x
的主機名,例如:
\\hostcomputer.server.uk\shared$\folder_x
如何在Python中以編程方式執行此操作?
我想澄清一下,我不想訴諸使用'dfsutil.exe'我希望解決方案是一個純python解決方案。 –
這是否有助於https://mail.python.org/pipermail/python-win32/2008-August/008115.html? –
它似乎是接近但不是那裏 –