I am looking at incrementing part of a filename, only if, it is a new version being created after the initial creation at the beginning of the month.
Tasks for the job so far are:
1: job report - to see if the job has been run yet this month
2: create a variable out of the date of the last run of the job
3: run a script via command line to create the monthly files.
4: Zip up the newly created files, as they need to be in one particularly named zipped file.
5: rename the zip file to what is needed (XXX_(creation date)_V01.zip) *the V01 is what needs to possibly be incremented.
6: get the name of the zipped file
7: create a fileName variable with the zipped files' file name.
The initial job is set to run the 5th of every month. If I have to run it again after that, the V01 needs to be incremented to ie V02 and so on. How would I go about doing this? Should I be checking the last run date later and of a specific task? Should I use a loop? Any possible ways would be greatly appreciated.
Thanks!
Edited by user
2018-11-30T18:58:47Z
|
Reason: Not specified