Skip to content Skip to sidebar Skip to footer

Transfer Only Contents Of Directory Using Scpclient Python

I am trying to move the contents from source directory C:\report to the remote directory remote_server_path/Test. Below is the code that I am trying with. Instead of just moving th

Solution 1:

Use C:\report\* to select the files within the folder.

scp.put('C:\\report\\*', recursive=True, remote_path='remote_server_path/Test/')

Obligatory warning: Do not use AutoAddPolicy – You are losing a protection against MITM attacks by doing so. For a correct solution, see Paramiko "Unknown Server".

Post a Comment for "Transfer Only Contents Of Directory Using Scpclient Python"