我正在使用Perl模块Net :: FTPSSL和'重命名'不起作用,一切都做。 我已validation该文件在那里,我可以使用基于GUI的ftp客户端重命名它,但不能通过Perl模块。
>>> RNFR ftpbogus.txt, testfile.txt <<< 550 RNFR command failed.
下面是代码。
use Net::FTPSSL; use Test::More; my $server = "localhost"; my $ftps = Net::FTPSSL->new("localhost", Port => 990, Encryption => 'E', Debug => 5); $ftps->login("ftpuser55", "narfnarf"); ## copying a file to the user's home directory. $ftps->put("ftpbogus.txt"); my @ret = $ftps->list(); ## renaming a file in the ftp server $ftps->rename("ftpbogus.txt, testfile.txt"); #$ftps->quit();
rename 需要两个参数 : OLDNAME, NEWNAME 。 你传递一个string与两个文件名,该命令应该阅读
$ftps->rename("ftpbogus.txt", "testfile.txt");