I am trying to copy .zip files from a shared network folder to a unix environment using pysmb. The process will copy the .zip file names, but not the contents of the files
smbFolder = "networkdrive"
conn = SMBConnection('username', 'password', smbFolder,'')
conn.connect(smbFolder)
Share='shareFolder'
ShareFolder='TargetFolder'
ShareFilename = ShareFolder
Contents = conn.listPath(Share, ShareFolder)
for Content in Contents:
try:
conn.retrieveFile(Content, open(savePath + '/' + Content.filename, 'wb'))
except: None
conn.close()
Expecting this to copy zip files to the savePath folder along with the contents of the zip file, but zip files are copied as empty folders