As the auditing was a later requirement after deployment I went the log file route and used the following code. My strategy was to create a temporary output file (expireduser.log) which contents would then be copied into archive log and then expireduser.log was deleted for next runtime, like so:
Code: Select all
copy H:\UserArchive\archive.log+H:\UserArchive\expireduser.log
del H:\UserArchive\expireduser.log
Code: Select all
type H:\UserArchive\expireduser.log >>H:\UserArchive\archive.log
del H:\UserArchive\expireduser.log
The question is why?