Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline tom_v  
#1 Posted : Thursday, April 26, 2018 9:58:02 AM(UTC)
tom_v

Rank: No customer

Joined: 2/19/2018(UTC)
Posts: 2
Germany
Location: Berlin, Berlin

Hey Forum,

i hope you can help me with this Problem.
I want to Compress something.
I use C# for Programming my tasks.

I just dont know how the correct Code should look like.
I tried a FileFilterClass and a ArchiveItemClasse.

My Code looks like this:
Quote:

FileFilterClass ffc2 = new FileFilterClass();
ffc2.IncludeFileMask = "*.*";
ffc2.SourceFolder = "\\\\testserver\\c$\\Programs\\test\\test\\logs";
ffc2.Credential = vcds.thecreds["testuser"].Id;
ffc2.IncludeSubFolders = true;

ArchiveItemClass aic = new ArchiveItemClass();
aic.FileFilter = ffc2;
aic.ExistAction = EnumClass.ExistActionT.Append;

// Task 3 und 4 ausstehend
TaskClass task3 = job.AddTask(TaskClass.TaskT.ArchiveCompress);
task3.Name = "Test Log zippen und archivieren";
task3.ArchiveCompress.ArchiveType = TaskArchiveClass.ArchiveT.Zip;
task3.ArchiveCompress.ExistAction = EnumClass.ExistActionT.OverwriteIfNewer;
task3.ArchiveCompress.ArchivePath = "\\\\testserver\\logs\\Test_{DATENOWADD(Days|-1|dd.MM.yyyy HH_mm)}.zip";
task3.ArchiveCompress.CompressionLevel = TaskArchiveClass.CompressionLevelT.Normal;
task3.ArchiveCompress.ArchiveItems = aic;


I got an Error at the last Line.
I hope you can give me a hint.

Kind regards
Offline Support  
#2 Posted : Thursday, April 26, 2018 6:24:20 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,223

Thanks: 875 times
Was thanked: 446 time(s) in 424 post(s)
What error do you get?
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top