Homepage EPM Guestbook SiteMap

Jörg's Jump2Directory - by Jörg Tiemann

Summary:  Jörg's Jump2Directory is a little REXX solution to jump to often used directories by giving them nick names.

Update: 2001/10/04  

Version 0.33 eliminates the need for a separate file to store the previous directory in (ie the directory you last jumped away from).  Now this is - slightely more elegant - stored in an OS/2 environment variable.  Don't know why I forgot to implement this into jj.cmd when I wrote the code for jcd.cmd long ago.

Download Jörg's Jump2Directory v.0.33 (.ZIP, 8 kB)

For impatient users  

Download Jörg's Jump2Directory (.ZIP, 8 kB), unpack the zip, place jj.cmd somewhere in your path, modify jjliste.db to meet your needs and then make the obviously appropiate changes in line 9 of jj.cmd. That's it.

Command Line Odyssey  

Probably this wheel has often been invented and I just haven't seen it anywhere yet ...

While using a command line (interface, CLI) we regularly have to change to other directories.  The better structured and deeper nested our directory structure is the more likely is it that the cd'ing will cause some typing.  Yet often the set of directories we cd to is very limited - again and again the same directories.  This suggests to give a short (easy to type and easy to remember) nick name (or alias as some would call it) to our often used directories and write a little cd'ing script that knows them.

Exactely that is what I have done a while ago.  Now here's a little introduction to Jörg's Jump2Directory

Our nick name database file  

When you open the package you find just three files, jj.cmd, jjliste.db and jj_readme.html.  jj_readme.html is what you are reading, jj.cmd is the REXX script <surprise!> and jjliste.db is the database which stores the often cd'd to directories together with their nicks (aliases).

Let's have a look at jjliste.db.

 bin   d:\tcpip\bin
 bmp   d:\os2\bitmap
 cdr   e:\apps\cdrecord\cdr-1_9a02
 ema   e:\apps\epm\e_macros
 epm   e:\apps\epm
 ns    e:\apps\netscape
 ns2   e:\apps\netscape
 stat  t:\wget\mirror\stats.distributed.net\rc5-64
 some  y:\some\deeply\nested\directory\with\a\verylongname   
 tmp   d:\tmp
 tvfs  e:\apps\tvfs211
 wget  t:\wget

So this file consists of lines where the first word is the nick for a directory and the second word is the directory's fully qualified path including the drive letter.  More than one nick name for a directory is allowed (see the netscape lines), but giving the same nick to two directories will not work. 

Now just edit this file, erase my nick name assignments and enter your often used directories together with their nicks.  When finished just put the file somewhere.

The cd'ing REXX script  

Now we just have to edit just one line in jj.cmd. 

 Datenbank = 'r:\jjliste.db'

Again not really hard to guess. The "Datenbank" line asks for the location of your jjliste.db.

The directory you last jumped away from is no longer stored in a separate file, but you still are able to return to that directory.

Now put jj.cmd somewhere into your path to complete the installation.

The usage of Jörg's Jump2Directory  

Hhm, methinks I've written something about it already ...  I remember:
Just enter jj without any arguments to get this usage screen:

 epm: D:\apps\EPM > jj
  Joerg's Jump2Directory v0.32 - Fri, 31 Aug 2001
  (c) 1997-2001 by Joerg Tiemann
   jj [argument]   jump to a directory whose nick is given as argument
                   (as defined in jjliste.db)
   jj [option]     performs action defined by option
     Available options are:
       -         switch to previous directory
       -? -h     show short help (this one)
       -l        list available shortcuts and the directories they stand for  

To me this sounds pretty understandable.  Any questions?

The non avoidable disclaimer  

I have written Jörg's Jump2Directory and you are hereby entitled to use this software for free. 

But if you use Jörg's Jump2Directory you do it at your own risk!

I am not aware of any bugs the script may have and in 5 years it has never caused any data loss or damage on my system.

But if you use Jörg's Jump2Directory 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 Jump2Directory 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.

Homepage Top EPM Guestbook SiteMap

Copyright © 2001 - Jörg Tiemann Last modified: Wed, 24 Oct 2001

gratis SMS verschicken im Uboot.com gratis HTML checken bei w3.org gratis quer denken mit Wau Holland