How Do I Read and Write Files from/to the Directory of the Project? (Magic xpa 2.x)
When a project is running, the default directory is the project directory, that is, the location of the .edp or .ecf file. So, when you create a file in your application and do not give it an explicit path, it will automatically be created in the project directory.
For instance, if we have three database tables in our DayTimer application as shown below:
When you reference other files in your programs, such as i/o files, they work the same way. You can use relative paths to refer to locations beneath the project directory.
If there are multiple projects in the application, then the project directory is determined by the location of the top level project. So, if the DayTimer project called a component that wrote to the project directory, those files would also be in our “DayTimeCalendar” directory.
If you want to refer to the project directory specifically, you can use the built-in Logical Name (%Working Dir%).