Computing.Net > Forums > Linux > Running a exe from different folder

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Running a exe from different folder

Reply to Message Icon

Name: Asif Ali
Date: September 9, 2004 at 06:10:31 Pacific
OS: Unix
CPU/Ram: -
Comment:

Am trying to run a exe on my unix machine from a different folder.

For instance,
i have a perl file in a folder /home/asif/runprj.pl which runs a exe in a different folder /home/projects/cobsat/a.out

and my perl file is something like this

#!/usr/bin/perl
system("/home/projects/cobsat/a.out");

now ...is there anyway I can run the exe by actually getting into the cobsat directory and simply execute ./a.out instead of runnin it with absolute path.



Sponsored Link
Ads by Google

Response Number 1
Name: Wolfbone
Date: September 9, 2004 at 07:53:54 Pacific
Reply:

chdir "/home/projects/cobsat";
system("./a.out");


0

Response Number 2
Name: Sord
Date: September 11, 2004 at 14:28:32 Pacific
Reply:

In linux "exe"s are worthless. I understand what you
meant to say but please realize they are not called exes,
that is for the windows world.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Running a exe from different folder

How can I run a .exe application ?? www.computing.net/answers/linux/how-can-i-run-a-exe-application-/22969.html

Running a script from SSH www.computing.net/answers/linux/running-a-script-from-ssh/11671.html

How do you instal a program? www.computing.net/answers/linux/how-do-you-instal-a-program/21416.html