How to run programs from a different directory in unix

unix

I know this is a very simple question, and that many similar (but more complicated!) questions have been asked- So i wanted to ask this in a very plane manner. Sorry if this voids the rules of conduct on this website! I'm very new to using unix.

I have a program that converts a ".evt" file to an .rq1, which is used for data analysis. The command to do so is simple, for example: Convert data.evt (this outputs data.rq1).

This program, let's say, is located in directory /A and I have a data file that I want to convert in directory /B. How would I go about executing this program without moving the convert program to directory B?

Best Answer

It is very simple:

./A/Convert B/some_file  

It means go to the directory A and run the program with parameter that you will give.

Related Question