codebots.bots.sshbot.sshBot.get_folder_from_server#

Method

sshBot.get_folder_from_server(path, dest, recursive=True, close_connection=True)[source]#

Retrieve the content of a folder from the server.

Parameters:
sftp_clientobj

paramiko sftp client object

pathstr

path to the folder on the server

deststr

path to the folder on the client (local)

recursivebool (optional)

if true get subfolders content, by default

close_connectionbool (optional)

if true close the ssh connection, by default True. Leave the connection open if you plan to run several commands.

Warning

If in any folder there are files without extensions, the code will fail!