Beginner Event 8: The pole vault
In the pole vault event, you will raise the bar as you run down the folder that is consuming the most disk space on your computer.
“Hey, Scripting Guy! How can I leap over buildings with a single bound?” No, we have not received an e-mail such as that yet. But if we ever do, we will point them to the pole vault event. An old dude once said, “Give me a lever long enough and I will move the moon.” Of course, that was back when lever technology was still new, and its inventors were still trying to find out the practical limits of that new and exciting technology. Well, a pole vault is the sports application of lever technology. Scripting is the IT pro’s lever. We could just as well say, “Give me the right script and we will move the moon.” All we need to do is to find the WIN32_Moon WMI class and implement the move method, and we are good to go.
In this event, you are tasked with solving a very common problem. Sherlock Holmes might call it The Case of the Missing Disk Space. You get to play Dr. Watson and write a script that will query your local hard drive in an attempt to identify which folder is consuming the most disk space. You will need a strong lever when you try to vault over this assignment. Keep in mind that folders can contain other folders, which in turn can contain other folders. You get the idea.
Hint: If you are stumped with this task, you may want to search the Script Center for information about recursion. If you write a script that uses recursion, the script will be much easier to develop.
Advanced Event 8: The pole vault
In the pole vault event, you will soar over your goals as you write an activity tracker script.
Sooner or later, everyone will need to have a log of their work activities. It starts out like this, “What do you do all day? What do you mean you do not have time to fix my problem? Every time I come in here you are on the phone. Who do you talk to all day?” Or maybe you work for a boss who knows instinctively you add significant value to the organization and is able to sufficiently articulate that value to upper management. Even if you work for yourself, did you ever catch yourself at the end of the day saying, “What do I do all day?” The answer to these mysteries is an activity tracker. The essential element in any activity tracker is that it must be fast and easy to use.