Hi guys:
I need to create a double loop to ZIP files in a determinated directory. Also, I need to separate them by Extension and YearMonth. So I started to think on have 2 distincts rankings, one of them based on the Extension of the filename (and I need it to be dynamic to support any kind of file that appears in the directory) and the other with a ranking based on Rank_By_Extension+YearMonth
I have a table that contains the following structure:
FILE_NAME | EXTENSION | BASE_NAME | YEARMONTH | ZIP_NAME | RANK_BY_EXTENSION | RANK_BY_EXTENSION_PLUS_YEARMONTH |
---|
MYFILE_20150110.TXT | TXT | MYFILE | 201501 | TXT_MYFILE_201501.ZIP | 1 | 1 |
MYFILE_20150113.TXT | TXT | MYFILE | 201501 | TXT_MYFILE_201501.ZIP | 1 | 2 |
MYFILE_20150218.TXT | TXT | MYFILE | 201502 | TXT_MYFILE_201502.ZIP | 1 | 3 |
MYFILE_20150310.CSV | CSV | MYFILE | 201503 | CSV_MYFILE_201503.ZIP | 2 | 1 |
MYFILE_20150111.XML | XML | MYFILE | 201501 | XML_MYFILE_201501.ZIP | 3 | 1 |
MYFILE_20150118.XML | XML | MYFILE | 201501 | XML_MYFILE_201501.ZIP | 3 | 2 |
MYFILE_20151126.DAT | DAT | MYFILE | 201511 | DAT_MYFILE_201511.ZIP | 4 | 1 |
MYFILE_20151201.DAT | DAT | MYFILE | 201512 | DAT_MYFILE_201512.ZIP | 4 | 2 |
MYFILE_20150517.TXT | TXT | MYFILE | 201505 | TXT_MYFILE_201505.ZIP | 1 | 4 |
My table has the fields in blue populated and I need to fill these 2 others fields, Can anyone help me?
Regards.
Luiz Araujo