When I open a source file from my project and I run a custom build script, I want the working directory to initialise to the actual current working directory from which the source file was opened. Any idea how to do this?
UPDATE: Also, how can I set the "Working Directory" to one level above the actual working directory?
I'm not sure I understand exactly what you're after, but there are a number of variables that can be used in External launch configurations.
From your description, the likely one is to put ${resource_loc} in the Working Directory: field.
From the description:
Returns the absolute file system path of a resource. The target resource is the selected resource when no argument is specified, or the resource identified by a workspace relative path.
Alternatively, ${container_loc} might be more appropriate if you need to run on a directory:
Returns the absolute file system path of a resource's container. The target resource is the selected resource when no argument is specified, or the resource identified by a workspace relative path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With