powered by simpleCommunicator - 2.0.56     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / Output: compress the file with the directory, but i need just the compressed file.
2 сообщений из 2, страница 1 из 1
Output: compress the file with the directory, but i need just the compressed file.
    #38280893
rustamyan
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
public void Main()
{
string folderDirectory = Dts.Variables["dirDestinationFolder"].Value.ToString();
string fileName = "Report " + Dts.Variables["varEndDate"].Value.ToString() + ".xls";
CompressReportsFolder(fileName, folderDirectory);
Dts.TaskResult = (int)ScriptResults.Success;
}

public void CompressReportsFolder(string fileName, string folderDirectory)
{
ZipFile zip = new ZipFile();

string strOriginFilewithPath = folderDirectory + fileName;
zip.AddFile(strOriginFilewithPath);


string strCompressedFilewithPath = folderDirectory + fileName.Replace(".xls", ".zip");
zip.Save(strCompressedFilewithPath);
}

Output: compress the file with the directory, but i need just the compressed file. Thanks
...
Рейтинг: 0 / 0
Output: compress the file with the directory, but i need just the compressed file.
    #38281233
Фотография buser
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / Output: compress the file with the directory, but i need just the compressed file.
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]