This project is read-only.

Compress files and folders

Feb 21, 2013 at 2:02 PM
I am trying to compress files and folders in my ftp through FTPClient but i can't do that

i tried to use excute
 FtpReply reply;

            if (!(reply = conn.Execute("SITE compact /c /s:/atmosphere.txt")).Success)
                throw new FtpCommandException(reply);
but that failed to
Feb 21, 2013 at 2:10 PM
System.Net.FtpClient knows nothing of compression algorithms or the site command. With that said, I can't offer any insight into why that command failed without seeing what reason the server said and even then you may have to look at the log files on the server itself.
Feb 21, 2013 at 2:14 PM
When i used
  conn.Execute("SITE compact /c /s:/atmosphere.txt")
this error message returned "Command not implemented for that parameter"

when i used
conn.Execute("compact /c /s:/atmosphere.txt")
this error message returned "Syntax error, command unrecognized."
Feb 21, 2013 at 2:36 PM
The second command, without SITE, is not valid. Your first example is syntactically OK but the server is not accepting the compact command. The problem is a policy issue, not a limitation of System.Net.FtpClient.
Feb 21, 2013 at 2:56 PM
Ok, Thanks jptrosclair i am trying to find another solution for my issue