A tiny but useful program by

Bruce Hayes


Phonologists and morphologists often find it useful to find all the strings in a data set that end similarly.  This little program, "Reverser.exe", takes a text file and amplifies it to include a copy of each line, in reversed order.  Hence, a file that looks like:

Noam [tab] Chomsky
Roman [tab] Jakobson
Bruce [tab] Hayes

is altered to:

Noam [tab] Chomsky [tab] yksmohC [tab] maoN
Roman [tab] Jakobson [tab] nosbokaJ [tab] namoR
Bruce [tab] Hayes [tab] seyaH [tab] ecurB

The result can then be opened in a spreadsheet program such as Lotus 1-2-3 or Microsoft Excel.  Then you sort on (for example), the third column, which yields a reverse sort of the first names.

Reverser.exe runs, alas, only in Windows.


1. Make an empty folder.

2. Click here to download the file  Put it in the empty folder you just created.

3. Open the folder.

4. Use unzipping software (my favorite is FreeZip) to unzip

5. Look amongst the bunch of files just created for a file called setup.exe.  Click on it.  This will start the Windows setup routine.  Click as needed, and you will obtain an installed copy of Reverser.exe.

6. To run Reverser, click on Start, Programs, Reverser, and follow the instructions on the buttons.  For a file named (e.g.) MyInputFile.txt, Reverser creates a new file in the same folder called MyInputFileReversed.txt.

7. Note that the input file to Reverser must be a plain text file.  Most spreadsheet programs have an option, "Save as tab-delimited text," which you should follow.

8. When the program has finished, it will tell you the file name and location of the reversed file.  You can either find this file, or (if you have Excel, installed in the location C:\Program Files\Microsoft Office\Office\excel.exe), use the "Convenience Button" to open this file directly in Excel.

9. To run Reverser more conveniently, you can create a shortcut.  Open the folder c:\Program Files\Reverser, and drag Reverser.exe to the desktop.

10. If you really like reversing, you can also configure Windows to open .txt files using Reverser.  Do (precisely) this:  Start, Settings, Folder Options, File Types, scroll down to Text Document and click, Edit, New, type "Open with Reverser" in the Action box, Browse, locate and click once on Reverser.exe (it's in c:\Program Files\Reverser\reverser.exe), OK, Close, Close.  Then, when you want to reverse a file, right-click on it, and choose "Open with Reverser."  

Later versions of Windows than 98 have easier "Open with" capabilities; try right-clicking on the file you want to reverse.

Comments and feedback can be directed to my email address.

Back to Bruce Hayes's Home Page