I have a file that I would like to copy from a shared folder which is in a shared folder on a different system, but on the same network. How can I access the folder/file? The usual open() method does not seem to work?
Open My Computer and click on the Tools menu option. From the drop down list, choose Map Network Drive. Pick a drive letter that you want to use to access the shared folder and then type in the UNC path to the folder.
open(r'\\HOST\share\path\to\file') and open('\\\\HOST\\share\\path\\to\\file') worked with backward slash. For pd. read_csv() , forward or backward slash, doesn't matter.
Use forward slashes to specify the UNC Path:
open('//HOST/share/path/to/file')
(if your Python client code is also running under Windows)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With