I am creating an ssis package that copies and renames a file each time the package is run. I can get the filename to include the current date, however I would also like to include a version number just in case the package needs to be executed more than once in a day. (example: filename - date - 1, filename - date - 2)
Answer by Fatherjack ·
Why not add the time too?
Filename = original
201003101200-Filename = execution at 12:00 on 10/Mar/2010
201003101300-Filename = execution at 13:00 on 10/Mar/2010
201003101600-Filename = execution at 16:00 on 10/Mar/2010
Answer by Jason Crider ·
Not sure if you can use it, but here's a nice way to copy and rename in one step. Depends on how your logic is for usefulness.
Can you check for the existence of the file and if it's not there you put it with a 1 on there. If it is there, you take the number it has and add 1 to it.