Batch Files Revisited
The network at my company is locked down pretty tight, (I would say waaaaay too tight) so I am not able to do certain things like connect to CodePlex via Team Client or Subversion. Normally not a big deal, except that I am working on BookShelf during my lunch break (when I take a lunch break), and I have no way to get the latest build or check-in any changes that I have made.
The last couple of days, I have been manually creating a zip file using PKZip for Windows, and then FTPing the file up to my web site using FileZilla. This takes a couple of minutes, and isn’t really a big deal, other then it is the same repeatable process over and over again.
So, in the spirit of simplifying my life, I spent this morning writing batch files to zip and unzip any changes files into my project folder. I am not sure that I have written a batch file since I got my first computer in high school, but batch files and qbasic in DOS 5 were my introduction into programming, and I had a little nostalgia this morning.
One of the side effects of setting up an automated build process at work is a remembering or relearning of some of the scripting techniques that I gave up when I transistioned into a real programming language. I am kind of amazed, and a little bit ashamed, at the sheer number of repetitive tasks that I perform in Windows that I just live with. Want to rename 15 files in a folder? Hit F2 and type a new name 15 times. Want to print a list of files in a folder. Hit PrtScn, paste into Word and hit Print.
I am trying to figure out at what point opening up a cmd.exe window and typing ren or dir > file.txt fell out of my consciousness.




