[fpc-pascal]Re: chdir problem? -- 2nd request

Jeff Patterson pars at brunnet.net
Fri Jan 12 13:23:22 CET 2001


There is a program that claims that it can change the current directory
under DOS/Unix/Win32 Console (Win9x/NT/2000), Win32 ZShell, Win32 Cygwin,
and more.   http://www.xs4all.nl/~waterlan/

C Source appears to be available, but I have not looked at this program at
all yet.

----- Original Message -----
From: "Gabor DEAK JAHN" <djg at argus.vki.bke.hu>
To: <fpc-pascal at deadlock.et.tudelft.nl>
Sent: Thursday, January 11, 2001 6:42 PM
Subject: [fpc-pascal]Re: chdir problem? -- 2nd request


At 01/10/2001 06:30, you wrote:

Dear Jim,

> anyfile.name and have it find the file, CD into the directory where the
> file is and then exit (leaving you at the DOS prompt, but in the directory
> of the file you were searching for). The go32 targets work just fine, but
> the Win32 targets leave you in the directory that the program was launched
> from and not the directory where the file was found.

And it will probably remain so, there is no way to change the current
directory of another program without it consenting (CMD.EXE could have been
made to accept, for instance, DDE messages asking it to change the
directory). The closest what I could think of is to put the found directory
name, prefixed with the command CD, to the clipboard and instruct the user
in the last line of the program's output that in order to change to that
directory they could select Paste from the system menu, then press Enter.
Far from perfect, I agree, but...


Bye,
Gábor

-------------------------------------------------------------------
Gabor DEAK JAHN -- Budapest, Hungary.
E-mail: djg at tramontana.co.hu, djg at argus.vki.bke.hu


_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list