Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ftp

Using FTP commands I want to upload a large file once and then copy that file to many directories on the remote FTP server. All the copy commands seems to relate to copying from local to remote or the other way around.

Is there an FTP command to copy remote to remote?

like image 293
John Small Avatar asked May 08 '13 15:05

John Small


2 Answers

are you trying to move the file? if yes, you can do it using rename command to move the file, as for copy i guess you still have to do the the get,send from local-remote way.

as for move command should be something like this

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

Basically just rename your file path that is infront of the file that you wish to move.

like image 136
Khang Jiunn Avatar answered Oct 20 '22 03:10

Khang Jiunn


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

like image 23
Nickolay Olshevsky Avatar answered Oct 20 '22 04:10

Nickolay Olshevsky