How can I copy/duplicate a file to another directory using SFTP? -


I have created a directory inside a Sftp location and I want to move one file from one SFTP directory to another But the CP command is not supported there.

How can I get it?

A core SFTTP protocol does not support repeating a remote file.

There is a draft, but only a few SFTP servers (and for example, bitwiz sftp server) and some SFTP clients (for example).

This is definitely not supported by the most comprehensive OpenSSH SFTP server; OpenSSH is not equivalent to any cp command or any other functionally by SFTP client ().


Options:

  • If you have SSH / Terminal Access in the server, use.
  • If your SFTP server supports the copy-file extension, then use the SFTP client which also supports it.
  • Otherwise, your only option is to download the file to a local temporary location and upload it back in a separate / targeted remote directory.
    Some SFTP clients can also do this for you in a transparent way (such as in WinSCP, see duplicate via local temporary copy option).

(I'm the author of WinSCP)


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -