Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Guest
2012-04-04T12:20:13Z
hi,
How do i zip files individually automatically when they automatically arrive into many subfolders?

Andrew
Sponsor
Forum information
Support
2012-04-04T12:55:01Z
Basically this involves creating a File Trigger on the base folder. Let it watch sub folders. Then, in the same Job you create a Archive - Compress Task. Use the File Trigger result Variables into the Archive item folder and file mask.

Folder: {TRIGGER(Active|LastTrigger|File.Result.Folder)}
File mask: {TRIGGER(Active|LastTrigger|File.Result.Name)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T12:57:30Z
ok thanks. I'll have a play and see how i get on.
Guest
2012-04-04T13:51:35Z
ok i have created the job file trigger but i'm not sure what you mean by

"Use the File Trigger result Variables into the Archive item folder and file mask."

In the archive-compress, archive settings tab the archive path requires a file name do i browse to the base folder then add

{TRIGGER(Active|LastTrigger|File.Result.Folder)} as the file name?

I cant see where i would add the file mask variable.

Andrew
Support
2012-04-04T13:54:14Z
Archive settings tab contains the information about the file that should be created. I am talking about the content tab where each individual file (that should be compressed) is defined.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T14:06:38Z
ok. In the content tab i have clicked add and on the location tab i have browsed to the base folder then added a slash and copied the folder trigger. I then copied the file trigger into the include file mask.

It then say's in the path could not find trigger for: {TRIGGER(Active|LastTrigger|File.Result.Folder)}

it also says in the file mask could not find trigger for:{TRIGGER(Active|LastTrigger|File.Result.Name)}

then when i click OK a box says Archive path must not be empty

Support
2012-04-04T14:08:01Z
You should not add any slashes - only use the Variables below.

The reason for the error is that you have not specified the zip file you want to save _to_.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T14:16:13Z
I want the files to zip themselves up as soon as they arrive so I don't have a specific path or filename because there will be hundreds of different files in hundreds of different sub folders.
Support
2012-04-04T14:20:52Z
You wrote zip in your first post so I thought you wanted to zip. But you want to unzip?

Then you need to use the Archive - extract Task. Same thing here, you specify the target folder name if you want to extract in a specific folder and use the two Variables in the Extract tab of the Task.

You don't have to know the file name as you have the Variables that point to new files. New files will be unzipped right away as they come.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T14:24:25Z
No definitely zip, not unzip.
Support
2012-04-04T14:25:17Z
So, what do you mean with "I want the files to zip themselves up as soon as they arrive".
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T14:26:48Z
that means zip. when you "zip up", you zip not unzip, like when you zip up your fly's 🙂
Support
2012-04-04T14:28:25Z
Got it. So, do you have any questions now. I mean, you only need to set 3 settings on the Task in order for it to zip all new files that arrive. Do you want to zip them in the same file?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T14:33:22Z
I'm totally confused now sorry, total newb i know ;-)


Let me start again:

Files are being moved from one folder with subfolders to an archive with the same structure.

When the files arrive in their new home i want them to be zipped. I don't mind if they are zipped before they leave or after they arrive whichever is easier.


Support
2012-04-04T14:43:30Z
You have a Job. You add a File Trigger to watch for new files you want to zip.

In the Job you add a Archive - compress Task.

In the archive settings you set the name of the new zip file (full path).

In the content you set;

Folder property: {TRIGGER(Active|LastTrigger|File.Result.Folder)}
File mask: {TRIGGER(Active|LastTrigger|File.Result.Name)}

Now, just try add a new file in the folder you watch and check the archive path to see if it was added in the zip file.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-04T15:10:20Z
ok cool but..

"set the name of the new zip file (full path)" i dont know what this path will be, there could be hundreds of different files in hundreds of different path locations

Its as if i can only create one zip file per job in one location with a fixed pre defined name or i have to create a job for each sub folder but i want the files to zip with their original file names whichever subfolder they land in.

Maybe we could exchange some screenshots until i get the hang of it.
Support
2012-04-04T20:48:21Z
You could use:

{TRIGGER(Active|LastTrigger|File.Result.FullPath)}.zip

This will use the current path of the file and add a zip extension.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-05T07:56:52Z
brilliant, i'll give it go.

sorry i'm such a shmuck 🙂
Guest
2012-04-05T09:11:39Z
hi Henrik,
I tested it and it and it worked 🙂 but something strange happened..

I moved a file into my archive folder and visual cron kicked in and zipped it up but then it zipped the zip and

kept going! before i deactivated it i had a .zip
and a .zip.zip.
and a .zip.zip.zip etc


it went zippedy doo dah lol ha ha ha ha ;-)

Andrew
Support
2012-04-05T09:22:06Z
Ok, the problem is that you have a file filter on the File trigger that is probably generic like *. So, even the new zip file considers to be a new file.

Please use a file filter that matches your files, for example *.txt
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-05T09:34:08Z
That's awesome but can i do a file mask that incorprates all file extensions except .zip so it catches everything and doesn't self replicate?

Cheers
Support
2012-04-05T09:36:45Z
Not yet, we will probably add this soon.

But you can use:

*.txt;*.exe

etc
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2012-04-05T09:42:24Z
That's good enough!

Thanks once again Henrik for all your help, i got there in the end :-)

We love Visual Cron here at Datagraphic and we want T-shirts!


Andrew x
ErikC
2012-04-05T09:46:03Z
Originally Posted by: afruish 

and we want T-shirts!


+1, LOL
Uses Visualcron since 2006.
Support
2012-04-05T09:52:31Z
We will think about this. 🙂 Perhaps coffee mugs as well - for late nights with VisualCron 😉
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top