I'm building a job that loops a list of records like below from a console app StdOut. This is to replace a old process that zips up kinds of files by month using file modified date, to the appropriate zip name and archive folder.
The record is zip-file-name|folder-to-zip|mask to include|base-date.
The loop works until I try to have it evaluate a date expression to limit the files included in the archive. I would like to use the date in the record to set a calendar month range, but I get an "invalid date" error on these expressions in the dialog. Any suggestions? If not possible currently, I would like this capability added.
Job variable BASEDATE = {LOOP(CurrentValueXArray,3)}
newer than: {JOB(Active,Variable,BASEDATE)}
older than: {DATEADD(Months|{JOB(Active,Variable,BASEDATE)}|M/d/yyyy|1|M/d/yyyy)}
Records look like this. Replace "logs" with other kinds of files, like reports.
\\server\BKUP\logs\jobcode_logs_201307.zip|\\server2\jobs\jobcode\logs|*.*|07/01/2013 12:00 AM
\\server\BKUP\logs\jobcode_logs_201308.zip|\\server2\jobs\jobcode\logs|*.*|08/01/2013 12:00 AM
\\server\BKUP\logs\jobcode_logs_201309.zip|\\server2\jobs\jobcode\logs|*.*|09/01/2013 12:00 AM
\\server\BKUP\logs\jobcode_logs_201310.zip|\\server2\jobs\jobcode\logs|*.*|10/01/2013 12:00 AM
\\server\BKUP\logs\jobcode_logs_201311.zip|\\server2\jobs\jobcode\logs|*.*|11/01/2013 12:00 AM
Edited by moderator
2014-03-12T21:09:54Z
|
Reason: Forget to define BASEDATE