As I discuss in Integrating Python and the Windows CLI, I like to have a command-line window open to my working folder so that I can easily edit code in IDLE, and run it in the CLI. This way, IDLE won't be affected by bugs and program crashes, and it provides a good place for error messages.
For a long time, I used the Start menu, selected 'Run' and typed 'cmd'. Then entered the command 'cd /d "Z:\Colin's Work\Code"'. It didn't take me that long, but over time, it became very apparent that this was a repeatable function. Much like in programming, if we have some code that we notice that gets used a lot, we take it and put it into a function which allows us to call that code with one line instead of four, which saves us time!
This is the same principle, and it's very simple. We just need to create a batch file and put it somewhere handy. What's a batch file? Well try the Microsoft reference or the Wikipedia entry for more detail, but simply put they are a set of commands entered by the user that get executed at once when the .bat file is executed.

First, we need to ask ourselves what we want our batch file to do. In my case, I want a command window to come up and have it switch to my working directory. So, I fire up my favorite text editor and start a new text file with the first line being my directory changing command. Remember, editing a batch file is like you already have the command window open; the file opens a window automatically when it is run.
cd /d "Z:\Colin's Work\Code"
If I save this file to my desired location, (mine is right on the Desktop) as 'code.bat' I can then navigate to the location and test it out! (i.e. double-click)
Well, for me the batch file terminates after it is finished with the command, so we need to add a command to make the window stay open. There could be many ways to do this, but one easy one is to simply make the second line 'cmd'. This will truly give us a command-line, and it should be working in the directory we desired.
cd /d "Z:\Colin's Work\Code"
cmd
This technique is just a minor time-saver, but as we know it's the little things that count! Here's a screenshot of my workspace hopefully that you get a sense of how I use this technique.
