I have looked all over the internet and these forums for an answer before I posted this. I can find little pieces of help here and there but not fully what I need. I need help writing code in a batch file that will allow me to automatically save the event viewer logs to a certain location with a certain file name and then clear the log out of event viewer.
1. I have 6 logs, Application/Security/System/DNS Server/Microsoft Office Diagnostics/Microsoft Office Sessions
2. I would like these logs to be saved with the building name that the servers are located in, also including the date that it was cleared and which log it was
3. Example of saved log name: "Bldg 248 16Nov12 Application" (date can also be in 20121116 format)
4. Logs need to save to My Documents Folder
If someone could get me started on what the coding will look like, which will allow me to edit it for all the other logs and buildings, that would be great.