I found a very good example about path variables in eclipse help documentation:
workbench user guide-concepts-ant & external tools
Lets assume your Eclipse workspace directory is: c:\eclipse\workspace
and you have two projects, MyProject1
and MyProject2
. The first project, MyProject1
, is located inside the workspace directory, the second project, MyProject2
, is located outside the workspace directory at c:\projects\MyProject2
. Lets look at how the variable examples below will be expanded when an external tool is run, if the resource /MyProject2/MyFolder/MyFile.txt
is selected.
****Variable Example ~~> Expanded Results****
${workspace_loc} ~~> c:\eclipse\workspace
${workspace_loc:/MyProject1/MyFile.txt} ~~> c:\eclipse\workspace\MyProject\MyFile.txt
${workspace_loc:/MyProject2/MyFile.txt} ~~> c:\projects\MyProject2\MyFile.txt
${project_loc} ~~> c:\projects\MyProject2
${project_loc:/MyProject1/MyFile.txt} ~~> c:\eclipse\workspace\MyProject
${container_loc} ~~> c:\projects\MyProject2\MyFolder
${resource_loc} ~~> c:\projects\MyProject2\MyFile.txt
${project_path} ~~> /MyProject2
${container_path} ~~> /MyProject2/MyFolder
${resource_path} ~~> /MyProject2/MyFolder/MyFile.txt
${project_name} ~~> MyProject2
${container_name} ~~> MyFolder
${resource_name} ~~> MyFile.txt
${build_type} ~~> none