(Jan-06-2022, 10:29 PM)DeaD_EyE Wrote: Does this work?
Oddly to me, no. I am surprised. Doubled separators as the first element of a path are supposed to be protected, but it looks like Path() destroys them.
>>> Path("//10.0.0.10", "USB_Storage") WindowsPath('/10.0.0.10/USB_Storage') >>> Path(r"\\10.0.0.10", "USB_Storage") WindowsPath('/10.0.0.10/USB_Storage')That seems like a bug to me (or I'm not setting something somewhere). If I can get past that limitation and construct the WindowsPath object directly, it should work okay. (And I have to turn the generator into a list to get the length)
>>> p = WindowsPath('//10.0.0.10/USB_Storage') >>> print(len(list(p.glob("*")))) 87