How to force/deposit string path in system verilog?

In reply to mitesh.patel:

There is no way in SystemVerilog to do this without using the VPI with C code.