I am using the TCL pre/post capability for a Vivado process. In the script, I point to source files using relative path names (e.g., ../<filename>).
From the Tcl console, the commands will work and the files are correctly found. However, when the scripts are run as a tcl.pre or tcl.post Tcl file, the files are not found.
Vivado processes (Synthesis, Implementation, etc.) are run in there own "runs" directory (e.g., runs/synth1). When a Tcl script is run as a tcl.pre or tcl.post script, they are run as if part of the process and will be run from the same directory as the process.
The Vivado Tcl command User Guide (UG894) contains the following note regarding this issue.
Relative paths within the tcl.pre and tcl.post scripts are relative to the appropriate run directory of the project they are applied to: <project>/<project.runs>/<run_name>. You can use the DIRECTORY property of the current project or the current run to define the relative paths in your Tcl hook scripts:
get_property DIRECTORY [current_project]
get_property DIRECTORY [current_run]