Using relative paths %Taskpath% to make tasks exchangeable

Imagine a Task with 10 Subtasks that are used, all subtasks write status logging about processed records into the Governance log folder. All in all there are 30+ locations in which the path is used. Whenever this task is copied into a different location all 30+ paths needs to be changed. Forgetting to change 1 results in inconsistency unless relative paths are used

What is a Relative path
A relative path refers to a location that is relative to a current directory. Relative paths make use of the Yarado %Taskpath% variable which translate into the current directory where the current task is opened.

Why do I want to use it.

  • Tasks will work independent from specific directory
  • Saves time typing the Absolute path
  • Tasks can be exchanged to different systems with different drives folder structure
  • Ability to backup tasks to date for version control

:warning: Opened Task absolute path C:\Tasks\Finance\Tax\Process_VAT.tsk will be the same as relative path %TaskPath%\Process_VAT.tsk

Absolute path Relative Path
C:\Tasks\Finance\Tax\Sub_SAP_Export_VAT.tsk %TaskPath%\Sub_SAP_Export_VAT.tsk
C:\Tasks\Finance\Tax\GLog\%timestamp%_processed.log %TaskPath%\Glog\%timestamp%_processed.log
C:\Tasks\Finance\Tax\GLog\%timestamp%_failed.log %TaskPath%\GLog\%timestamp%_failed.log

How do I Use it
Replace the Absolute path for the relative path anywhere the Absolute path is used

Example in Configure Subtask

Example in Append to File