in reply to How to create zip on FTP server from client machine using perl

It's customary to mark updates to your post, take a look at How do I post a question effectively?/PerlMonks for the Absolute Beginner. If you look at the documentation for Net::FTP the get method states "Get REMOTE_FILE from the server and store locally...". Your question was "I have been trying to create zip file of a folder containing some files on FTP server from client machine.", but your code shows logging into a server and retrieving a file. If you are trying to create a zip file of a directory on the FTP server, you won't be able to use FTP to do this. If you want to retrieve a directory from a server and create a zip file you can use Net::FTP to transfer the files then create a zip file. If you just want to create a zip file on the FTP server see my previous reply.

  • Comment on Re: How to create zip on FTP server from client machine using perl
  • Download Code

Replies are listed 'Best First'.
Re^2: How to create zip on FTP server from client machine using perl
by Mjpaddy (Acolyte) on Nov 22, 2016 at 12:09 UTC

    I want to create zip file on ftp server first of existing directory call Documents and then download it to local client machine

    I installed 7zip on server how can I send command to execute 7z a -tzip "07-Nov-201l\Documents.zip" "07-Nov-201l\Documents"

    You mention in previous reply use ->cmd can you tell me syntax for it.

      I don't see a cmd method, but there is quot(CMD,[ARGS]), so perhaps something like:

      $f->quot('7z', 'a', '-tzip', '07-Nov-201l\Documents.zip', '07-Nov-201l\Documents');
      But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)