archive compress - VisualCron - Forum

Community forum

luke1232
2017-02-20T12:29:09Z
When doing a archive compress. I have several files in a folder. I would like to compress them all but when I use either a file mask or regex it only ever seems to take the first item.

example
folder list:
x.txt
y.txt
z.txt

File mask is as follows:
x.txt;y.txt;z.txt

I also used a regex of x.txt|y.txt|z.txt
Only x.txt is added to archive and the other two remain.

What am I doing wrong?

Thanks in advance.
Gary_W
2017-02-22T20:43:03Z
The mask is so you don't have to list all the files. Try this for your first example of one letter filenames names ending in txt:
?.txt or this for any filename ending in txt: *.txt

A regex for the same for would be:
.\.txt or .*\.txt

Let us know if it works for you.
luke1232
2017-02-23T07:13:06Z
Unfortunately I need to specify a specific list of files.
Gary_W
2017-02-23T14:35:34Z
Can you give an actual folder listing, highlighting the files you need? Perhaps we can build a regular expression that will meet your needs.
luke1232
2017-02-24T06:55:45Z
Thanks Gary. Basically my listing above would be an example.

I need to specifically name the entire file. So if there are the following files in a directory:
x.txt
y.txt
z.txt
...
a.txt

The scenario is that files x-z are dropped in the directory and processed. while they are processing another file is dropped in the directory a.txt. Once x-z are finished I want to archive just those files and not a.txt because it was not in the original batch and still needs to be processed. I thought a regex expression like x.txt|y.txt|z.txt would work but it only seems to pickup the first file x.txt. I am not sure what I am doing wrong. I hope all that makes sense.

ErikC
2017-02-24T07:29:23Z
I just tested this regex (and compressed all 3 files):

[xyz].txt
or
[x-z].txt

Make sure the Is regex checkbox is checked.
Use the Test tab to test your regex. It will show the files it will compress.

[edit]
I also used your expression: x.txt|y.txt|z.txt and this one works also. It compresses all three files.
Please check the path and use the Test tab to check the files hit by your file filter setings.
[/edit]

Regards
Erik
Uses Visualcron since 2006.
luke1232
2017-02-24T07:51:17Z
Thanks Erik. That works. While implementing your solution i figured out what was wrong with my initial one. While I was creating the list I need to trim the file string before adding it to the list. Although you couldn't see any spaces something was there stopping it from working.

I got my original solution working now. Thanks again for your help.
Scroll to Top