Jan-06-2022, 10:29 PM
(Jan-06-2022, 05:24 PM)bowlofred Wrote: I don't see why that should problem (on windows). Python is able to access remote shares as UNC paths through normal file operations without an explicit mount. It works fine on my windows box. I would normally do this via pathlib, but glob and the backslash r-strings don't seem to get in the way.
I didn't know, that the Windows API allows accessing via samba protocol shares.
On Linux, this does not work.
Does this work?
from pathlib import Path server = r"\\10.0.0.10" share = "USB_Storage" path = Path(server, share) print(len(path.glob("*")))
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!