In FTP, how to copy a remote file to other directories

Using FTP commands, I want to upload a large file once, and then copy this file to many directories on a remote FTP server. It seems that all copy commands are related to copying from local to remote or vice versa.

Is there an FTP command to copy remote to remote?

+6
source share
2 answers

Are you trying to move the file? if so, you can do this using the rename command to move the file, since for copying, I think you still need to do get, send from the local remote path.

how for the move command there should be something like this

rename / oldpath / file2move.txt / newpath / file2move.txt

Basically just rename the path to the file that is opposite the file you want to move.

+2
source

As far as I know, there is no such command in the FTP protocol. There are some extensions to the SFTP protocol for this (and with SSH access you can issue cp commands), but SFTP is not FTP.

+1
source

Source: https://habr.com/ru/post/944542/


All Articles