paramiko - How to delete all files in directory on remote server in python? -


I would like to delete all the files in the directory given on a remote server, which is already paramiko. I can not explicitly give the filename, though, because it will vary based on the version of the file that I had previously placed.

What I'm trying to do here ... I'm trying to call the line call below #TODO where there is something like "remote optifpath" something like "/ opt / ef / *" . ("~", ".ssh", "known_hosts"))) ssh.connect (server, user name = username, pkey = mykey) sftp = ssh.open_sftp () # TODO: Anyway, all the files on the remote ArtifactPath needed to remove

thanks

one According to the rules, this can be as simple as: CD (RemoteArtfactPath) with run

 : run ("rm *")  

execute a shell command on a remote server Fabric is great to have Fabric really uses Parmico below, So that you need both if you need it.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -