[comp.binaries.ibm.pc.d] Looking for an interactive directory change pgm.

lane@cs.dal.ca (John Wright/Dr. Pat Lane) (06/23/89)

I feel almost silly asking about this as it's so simple (I imagine
people will say "It's a two line C program" or something) but I've
been looking for a while and haven't seen anything that really suits
my needs.

What I want is just a program that allows a user to type in a directory
path and/or drive name and changes the default drive/directory accordingly.
Most of the pgms I've looked at for this (Norton's NCD, Mefford's DIRMAGIC
are too damn fancy or have some other crucial drawback). Picking the
directory from a list or tree with the cursor keys or mouse would be nice
but not if its going to make the program take forever to start up (like
old versions of XTREE) or force the user to use that pgm for creating and 
deleting directories (as NCD does).  I'm also not keen on the thing creating
its own files (like NCD) and not working on SUBSTed drive is a killer 
(again like NCD - Mr. Norton, I'll buy your programs when they work on
my SUBST'd drives).  DIRMAGIC is the closest I've found but it tries to
do too much and IMHO has a confusing user interface.  Its companion pgm,
DM, doesn't work on SUBST'd drives oddly enough.

The reason I want this is for use with dumb pgms that don't let you change
directories once in them and thus require the user to get to the appropriate
directory first.  Also for use with simple menu systems (like Magee's
AUTOMENU) so the user can have a menu item "Change drive/directory".

Alternatively, I would be interested in *simple* menu systems that do
allow the user to move around on the hard disk - again, I find most things
like Norton's Commander, Xtree and Pathminder to be too complicated and
involved for the intended use - ie. for *very* novice users;  I want
something that is mainly a menu and not a file management package with 
menu abilities stuck in.

Yes, I know it's a two line (or whatever) C program but I'm really lazy
and I figure there's just *got* to be something out there already (and
I hate re-inventing the wheel).

Many thanks for any suggestions.

-- 
John Wright      //////////////////     Phone:  902-424-3805  or  902-424-6527
Post: c/o Dr Pat Lane, Biology Dept, Dalhousie U, Halifax N.S., CANADA B3H-4H8 
Cdn/Eannet:lane@cs.dal.cdn  Uucp:lane@dalcs.uucp or {uunet watmath}!dalcs!lane
Arpa:lane%dalcs.uucp@uunet.uu.net  Internet:lane@cs.dal.ca

jwright@atanasoff.cs.iastate.edu (Jim Wright) (06/28/89)

In article <3311@cs.dal.ca> lane@cs.dal.ca (John Wright/Dr. Pat Lane) writes:
| What I want is just a program that allows a user to type in a directory
| path and/or drive name and changes the default drive/directory accordingly.
| 
| The reason I want this is for use with dumb pgms that don't let you change
| directories once in them and thus require the user to get to the appropriate
| directory first.
| 
| Yes, I know it's a two line (or whatever) C program but I'm really lazy
| and I figure there's just *got* to be something out there already (and
| I hate re-inventing the wheel).

How about a 3 line batch file:
	cd z:\path\to\your\application
	application /with /your /favorite %1 %2 %3 /switches %4 %5
	cd c:\
Gets you in and out painlessly.  I've got tons of these that get dumped
to a ramdisk at startup.  Thus my path only has about 3 entries in it.

-- 
Jim Wright
jwright@atanasoff.cs.iastate.edu

det@hawkmoon.MN.ORG (Derek E. Terveer) (07/11/89)

In article <1146@atanasoff.cs.iastate.edu>, jwright@atanasoff.cs.iastate.edu (Jim Wright) writes:
> How about a 3 line batch file:
> 	cd z:\path\to\your\application
> 	application /with /your /favorite %1 %2 %3 /switches %4 %5
> 	cd c:\
	   ^^^^^^^

	   and what if my original directory was not c:\ ?
-- 
Derek Terveer 	    det@hawkmoon.MN.ORG || ..!uunet!rosevax!elric!hawkmoon!det
		    w(612)681-6986   h(612)789-8643

"A proper king is crowned" -- Thomas B. Costain

lfk@mbio.med.upenn.edu (Lee Kolakowski) (07/16/89)

You could of course get a real shell that is programable (MKS toolkit's ksh)

then

On 11 Jul 89 03:11:40 GMT,
det@hawkmoon.MN.ORG (Derek E. Terveer) said:
>> 	cd z:\path\to\your\application
>> 	application /with /your /favorite %1 %2 %3 /switches %4 %5
>> 	cd c:\
> 	   ^^^^^^^

> 	   and what if my original directory was not c:\ ?

could be written as 

	where_i_start=$PWD
>> 	cd z:\path\to\your\application
>> 	application /with /your /favorite %1 %2 %3 /switches %4 %5
>> 	cd c:\
#	instead of cd c:\
	cd $where_i_start

and then your finished.

BTW, I am only a very satisfied customer of MKS.....etc



--

Frank Kolakowski 

=====================================================================
|lfk@mbio.med.upenn.edu                 ||      Lee F. Kolakowski   |
|kolakowski@mscf.med.upenn.             ||	Univ. of Penna.     |
|c/o jes@eniac.seas.upenn.edu		||	Dept of Chemistry   |
|kolakowski@c.chem.upenn.edu		||	231 South 34th St.  |
|bcooperman.kolakowski@bionet-20.arpa	||	Phila, PA 19104     |
|AT&T:	1-215-898-2927			||--------------------------|
|#include <litigate.h>			||      One-Liner Here!     |
=====================================================================

vgopal@cbnewsc.ATT.COM (venu.p.gopal) (07/17/89)

In article <1046@hawkmoon.MN.ORG> det@hawkmoon.MN.ORG (Derek E. Terveer) writes:
>In article <1146@atanasoff.cs.iastate.edu>, jwright@atanasoff.cs.iastate.edu (Jim Wright) writes:
>> How about a 3 line batch file:
>> 	cd z:\path\to\your\application
>> 	application /with /your /favorite %1 %2 %3 /switches %4 %5
>> 	cd c:\
>	   ^^^^^^^
>
>	   and what if my original directory was not c:\ ?

You can use the utilities "pushdir" and "popdir" to do this (I believe they
are published by PC Magazine) as:

	pushdir
	cd to_wherever_you_want
	do_whatever_you_want
	popdir

There are other ways, one I like more uses

	putenv startdir %%cwd

to place the start directory into the env. variable startdir.  At the end
of your batch file, you can say "cd %startdir%" to get back.

IMHO, however, you should set up these batch files and configure your
applications so that you DO NOT NEED to change directories.  The data files
should end up in the current directory.  The data can thus be organized into
directories that belong to different projects you are working on, rather than
belonging to different tools you may use.  I have been able to do this for
with almost all software packages.

Venu P. Gopal
UUCP:	att!ihuxy!vgopal
Internet: vgopal@ihuxy.att.com
BITNET: com%"vgopal@ihuxy.att.com"   or   com%"vgopal%ihuxy@research.att.com"
Silence those silent letters, save the world 500 million keystrokes a day.

kevinc@cs.AthabascaU.CA (Kevin Crocker) (07/19/89)

In article <1793@cbnewsc.ATT.COM>, vgopal@cbnewsc.ATT.COM (venu.p.gopal) writes:
> You can use the utilities "pushdir" and "popdir" to do this (I believe they
> are published by PC Magazine) as:
> 
> 	pushdir
> 	cd to_wherever_you_want
> 	do_whatever_you_want
> 	popdir

One other way to do this is to use anarkey ver 2, which I just got,
because it allows aliases.  There is also a program called cdd.com
which even allows you to change drives.  I use batch files, generally,
of the form above and change to both my program directory as well as my
project or data directory.  I usually keep all my data on a separate
partition because it is much easier to back up.  I really don't want to
back up my programs all the time as I have already made the legal
backup copy when I got the original disks.

My batch files also reset the directory on exit to the root for that
partition so that things are just a little more sane.  This seems to
drive my coworkers crazy as sometimes they come in to use my programs
and they can never get them to work -- I also password protect my
executables just for safety -- you know -- a lot of sensitive data and
so forth.  My data is usually in hidden directories and is generally
password protected.

> Venu P. Gopal

Kevin Crocker
-- 
Kevin "auric" Crocker Athabasca University 
UUCP: ...!{alberta,ncc,attvcr}!atha!kevinc
Inet: kevinc@cs.AthabascaU.CA