| Homepage | EPM | Guestbook | SiteMap |
| Jörg's Change Directory | - by Jörg Tiemann |
|
Summary: Jörg's Change Directory is a little REXX solution
make the changing of directories more comfortable. Beside other features a search
through the database of Wolfgang Sarp's "Wolfgang's Change Directory" (no homepage found,
download link at the end of this document) is implemented. This database is also used by
the more prominent OS/2 Commander, an
excellent Norton Commander clone.
Download Jörg's Change Directory (.ZIP, 17kB), unpack the zip, place jcd.cmd somewhere in your path. Modify the lines 9-11 of jcd.cmd and be happy.
Every now and then, while wandering through my favorite command line interface (CLI) the sudden urge to change to another directory gets hold of my mind. From that point on I'm restless and forlorn in my blind struggle for directory change. Happy is me, that I have found a means to easily master the situation, to cope with the myriads of directories on my hard disks, to quickly and precisely spot the looked for one and cd to it. My method to achieve all this is neither new nor revolutionary. I use a database of the existing directories and a program, a little REXX script to be exactely, to find among all the directories (have I spoken of "myriads" of them above? yes, I have!) either the one I am looking for or to present me a list of the most promising candidates. Even more that this. My script uses 2 databases and also examines the current directory if there's a subdirectory suitable to match the information I have given as my cd'ing destination wish. Moreover relative cd'ings and those to the previous directory are supported.
When you open the package you find just two files, jcd.cmd and jcd_readme.html. jcd_readme.html is what you are reading, jcd.cmd is the REXX script. That's it. With only this two files what can jcd do for you? Well, it's better than nothing, surely better than cmd.exe's build in cd command, but it could be more:
Yes there is. Load jcd.cmd into your EPM and have a look at the lines 9 to 11:
"Datenbank" is German for database. So here we have our two databases. SCDatenbank points to the database used by "Jörg's Jump2Directory" (by the same author). I strongly suggest you have a look at it, it inhabits the webpage next to this. There you learn all about the structure of this database and what it is good for. Note: Though the Jump2Directory functionality of jj.cmd is implemented in jcd.cmd, it is not quite the same. Whereas in jcd.cmd the jj nick name resolution is just an additional feature and thus an additional check performed against the given parameter, it is the sole purpose of jj.cmd to find a matching nick. Therefore jcd.cmd looks for exact matches, while jj.cmd looks for all occurences of the nick in the given parameter. The second database jcd uses is that of Wolfgang Sarp's "Wolfgang's Change Directory", respectively his famous "OS/2 Commander". Both programs are shareware and at least one of it is needed if you want to use all the power if jcd. In the future I may add a REXX script which can create a compatible database, but at the moment I'm not that far and jcd can only read wcd.db. It does not matter if you use jcd without the one or the other database. It just restricts the use of this script to the more basic change operations. Now the last entry to customize is "Templist". Here you have to enter a path and filename where jcd can store a temporary list of directories it creates when finding more than one possible destination directory at a run.
OK, let's have a look at the long help screen, for it - in examples -
tells a lot about jcd:
I have written Jörg's Change Directory and you are hereby entitled to use this software for free. But if you use Jörg's Change Directory you do it at your own risk! I am not aware of any bugs the script may have and in 4 years it has never caused any data loss or damage on my system. But if you use Jörg's Change Directory you do it at your own risk! Thus if you like the script and you feel good about it, fine! But if Jörg's Change Directory by some strange accident (strange at least to me) manages to wipe all your data, poisons your favorite wife and en passant kills the mentally saner half of the inhabitants of Walla Walla (Washington, USA) I am neither to blame nor to thank for. I'm just a guy who merely sings to what appears to be a cat and punches little caps on what appears to be a keyboard. Should I be or do wrong - sorry! That's all you can expect from me. If you want someone to be right, be (or do) Mr. (or Mme.) Right yourself! And I mean this in the nicest possible way. If you want to share your thoughts on this script with me, you'll find my email address and my PGP pubkey on my feedback page.
There are reasons for this too, and reasons for the reasons, there always are.
Well, the answer is not hard to find. Toying around with the EPM command shell I found out that at the time none of the available cd tools was suitable to my needs. Many of them were very slow, other had huge, nearly impossible to maintain directory databases and the one tool that was fast and had a slim directory database, Wolfgang's Change Directory, insisted to use ANSI sequences to write on the screen. Those do not work in the EPM command shell. Thus I had a real close look at the database format, which is a very clever one, and did my best to use this (as a registered user of OS/2 Commander I in any case create my directories with it and thus had the database). I made some enhancements, allowing jcd to also use the little shortcut database of my "Jörg's Jump2Directory", accepting trailing backslashes and was happy. Moreover I think, though being by no means a programmer, I aquired a considerable amount of knowledge about how to solve problems using REXX (though using the same structures again and again - I'm kind of a 3.14159... (.TXT, 1.4 MB) trick pony ;-)). If you want to have a look at the competitor you can download Wolfgang's Change Directory from Hobbes: wcd161.zip (81kB)
|
| Homepage | Top | EPM | Guestbook | SiteMap |
| Copyright © 2001 - Jörg Tiemann | Last modified: Wed, 24 Oct 2001 |
|
|
|
|