如何在ftp服务器上创建zip文件,并将zip文件从ftp下载到客户端PC windows应用程序 [英] how to create zip file on ftp server and download zip file from ftp to client pc windows app

查看:825
本文介绍了如何在ftp服务器上创建zip文件,并将zip文件从ftp下载到客户端PC windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在ftp服务器上创建zip文件,并从c#中的ftp下载zip文件。



how to create zip file on ftp server and download zip file from ftp in c#.

public static void SaveFile(string[] MainDirs, string FileName, Uri FTPServer, string UserName, string Password)
       {
           try
           {
              ZipFile.CreateFromDirectory(FTPServer, FTPServer + FileName,CompressionLevel.Optimal, true);
}

推荐答案

你用什么库来创建.ZIP文件?



很有可能你无法在FTP服务器上创建.ZIP。您必须在本地创建它,然后将生成的.ZIP上传到FTP服务器。
What library are you using to create the .ZIP file??

Chances are really good that you cannot create the .ZIP on the FTP server. You have to create it locally and then upload the resulting .ZIP to the FTP server.


这篇关于如何在ftp服务器上创建zip文件,并将zip文件从ftp下载到客户端PC windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆