Summary: Dr. Scripto needs to gather all log files older than 90 days and move them to an archive location.
Microsoft Scripting Guy, Ed Wilson, is here. This is a day for the history books. Today is the first day of the 2013 Scripting Games as run by the Windows PowerShell community at www.powershell.org. Of course I am in full support mode for the Scripting Games, and I will also participate as a judge. Without further ado, here is Advanced Event 1…
An Archival Atrocity
Dr. Scripto is in a tizzy! It seems that someone has allowed a series of application log files to pile up for around two years, and they’re starting to put the pinch on free disk space on a server. Your job is to help get the old files off to a new location.
Actually, this happened last week, too. You might as well create a tool to do the archiving.
The current set of log files are located in C:ApplicationLog. There are three applications that write logs here, and each uses its own subfolder. For example, C:ApplicationLogApp1, C:ApplicationLogOtherApp, and C:ApplicationLogThisAppAlso. Within those subfolders, the filenames are random GUIDs with a .log filename extension. After they are created on disk, the files are never touched again by the applications.
Remember that the Scripting Games are being hosted at www.powershell.org, so head on over there to submit your entry.
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy