How to move a file on remote FTP server to an directory on same FTP server using Net::FTP in ruby script

前端 未结 3 1698
甜味超标
甜味超标 2021-02-08 09:55

How to move a file on remote FTP server to an directory on same FTP server using Net::FTP in ruby script. I know the file name and I have created a directory using ftp.mkdir b

3条回答
  •  温柔的废话
    2021-02-08 10:05

    Try rename command. If it doesn't work, you can try the following command: "SITE mv oldpath newpath" . This tells the server to execute the command on the server. The expected behavior won't work on all servers but only on some, so use SITE command only when you are sure that it will work with the particular server.

提交回复
热议问题