Changing directory and running a program

From: Ned Cunningham (Ned.Cunningham_at_monro.com)
Date: 02/25/04


Date: Wed, 25 Feb 2004 13:01:25 -0500
To: <beginners@perl.org>

HI all.

Can anybody tell me how to execute a command "remotely" in a Perl script from a different directory.
Please keep in mind I am asking what I want, not what you think I meant to say.

I need to:
 
('cd /d e:\ned\nedsdir`);
(`runprogram.exe -option - option -option`);

The program needs to be run from its current location, but the path needs to be at the new directory?

With the above code the directory is changed and the program run, however, the programs path is not set to the newly changed directory.

Thankx

Ned Cunningham
POS Systems Development
Monro Muffler Brake
200 Holleder Parkway
Rochester, NY 14615
(585) 647-6400 ext. 310
ned.cunningham@monro.com



Relevant Pages

  • Re: Changing directory and running a program
    ... >Please keep in mind I am asking what I want, not what you think I meant to ... >The program needs to be run from its current location, but the path needs ... >the programs path is not set to the newly changed directory. ...
    (perl.beginners)
  • RE: Changing directory and running a program
    ... > Please keep in mind I am asking what I want, ... > The program needs to be run from its current location, ... the programs path is not set to the newly changed directory. ...
    (perl.beginners)