Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-01

Re: chdir problem? -- 2nd request

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Gabor DEAK JAHN

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

Dear Arne,

Hmmm.. if you make your program launch a new CMD.EXE just before it exits (after changing path) - that new "command promt" should point to the desired directory?!?

You could do this easily by calling

Exec (GetEnv ('ComSpec'), '/K CD ' + NewDirectory);

and the directory WILL be changed even after the program exits, however, then you have a nested command interpreter running and you have to type EXIT twice. I don't think Jim would like this solution, either.

Bye,
   Gábor

------------------------------------------------------------------- Gabor DEAK JAHN -- Budapest, Hungary.
The Citroën BX Do-It-Yourself Site (with XM Pages): <http://argus.vki.bke.hu/%7Edjg/bx>http://argus.vki.bke.hu/~djg/bx/ E-mail: ,