![]() ![]() This returns 'Invalid drive specification' as an error. P = subprocess.Popen(args=cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)Ĭopy_folder(my_source_directory, '\\\\server-name\\path-to-shared-directory') The copy code I am using is as follows: def copy_folder(src, dest):Ĭmd = ![]() ![]() In response to questions, I am actually trying to copy files using the script, os.access was just used to see if the directory had write access. If you have anything to share, we would love to hear about it in the comments. In python, I am accessing the drive as follows (although I tried several different ways and had no success): os.access('\\\\server-name\\path-to-shared-directory', os.W_OK)Īny suggestions on what I might be doing wrong? That was it for OSError: (errno 22) invalid argument. I have administrative rights to the server and gave myself access to the shared drive (I verified this by copying files via Windows Explorer). When I try to access that file via a python script, however, I it says the directory does not exist. I am able to read from that folder remotely and write to that folder remotely via the Windows Explorer. I set up a shared folder on a remote server so that the folder shows up in the Windows Explorer as follows: \\server-name\shared-directory. This seems like a simple problem, but I'm having trouble figuring it out. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |