My question is the title. I have tried this:
public void UploadToFtp(List<strucProduktdaten> ProductData)
{
ProductData.ForEach(delegate( strucProduktdaten data )
{
ZipFile.CreateFromDirectory(data.Quellpfad, data.Zielpfad, CompressionLevel.Fastest, true);
});
}
static void Main(string[] args)
{
List<strucProduktdaten> ProductDataList = new List<strucProduktdaten>();
strucProduktdaten ProduktData = new strucProduktdaten();
ProduktData.Quellpfad = @"Path\to\zip";
ProduktData.Zielpfad = @"Link to the ftp"; // <- i know the link makes no sense without a connect to the ftp with uname and password
ProductDataList.Add(ProduktData);
ftpClient.UploadToFtp(ProductDataList);
}
Error:
System.NotSupportedException:"The Path format is not supported."
I have no idea how I should connect in this case to the FTP server and zipping the directory in ram and send it directly to the server.
... can someone help or have a link to a similar or equal problem what was solved?