If you want to open remote server folder using python in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
def copy_folder(src, dest):
if not os.access(dest, os.W_OK):
return(False)
cmd = ['xcopy', '/E', '/J', '/Y', '/I', src, dest]
p = subprocess.Popen(args=cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
out, err = p.communicate()
print 'out: %s' % out
print 'err: %s' % err
return(True)
copy_folder(my_source_directory, '\\\\server-name\\path-to-shared-directory')
0 Comment(s)