How do you use Paramiko to transfer complete directories? I\'m trying to use:
sftp.put(\"/Folder1\",\"/Folder2\")
which is giving me this e
Works for me doing something like this, all folder and files are copied to the remote server.
parent = os.path.expanduser("~")
for dirpath, dirnames, filenames in os.walk(parent):
remote_path = os.path.join(remote_location, dirpath[len(parent)+1:])
try:
ftp.listdir(remote_path)
except IOError:
ftp.mkdir(remote_path)
for filename in filenames:
ftp.put(os.path.join(dirpath, filename), os.path.join(remote_path, filename))