Home

Blog

Trains

16mm Guide

Suppliers

Ride-On Trains

Other Scales

Miscellaneous

Web Design

Links

FAQ

Contact Me

Windows Utility scripts

I spend most of my time developing on Ubuntu, a Unix-based operating system.
one of my biggest frustrations is when I move to a Windows system, and I need the command-line utilities I've become accustomed to. In particular, listing the files in a directory, and viewing a file, as these have different command names in Windows.

Having got fed up with typing ls when I meant dir, I wrote a set of aliases, so I won't need to get bothered about getting them wrong again:

Here's ls.bat. on the command prompt, type edit ls.bat, which will put you in a simple text editor (with menus at the top)

@dir
And to go with it, cat.bat, which lists the contents of a file
@type %1
These batch scripts can be placed in C:\Windows\System32\, so they will be in your path.

I'm also a big fan of diff and grep, both of which are available for windows from the GNU for windows project. (Warning: GnuWin32 itself contains a very large number of packages). You can get hold of these two using the links below:


GRG