Solved

Understanding relative paths

  • 9 April 2019
  • 2 replies
  • 77 views

I have a workbench set up on a desktop PC that is reading numerous data sets from folders on that computer. The workbench is also saved locally.

I have moved a copy of the data and workbench in the same folder structure onto our shared network where the start of the file path is different.

eg.

C:\\Data\\Workbench.fmw & C:\\Data\\Input\\Data.xls

becomes

P:\\Project\\Projectname\\Data\\Workbench.fmw &

P:\\Project\\Projectname\\Data\\Input\\Data.xls

 

How can I set up the workbench so I only need to change the folder path to data sources once, and all the others know that the relative path has changed?

 

Thanks!

icon

Best answer by thomas_g 9 April 2019, 15:55

View original

2 replies

Badge

You can use nested Parameters. So create a new parameter e.g. PARAMETER1 with the beginning of the path like "P:\\Project\\Projectname\\" as a value and a second one e.g. PARAMETER2 where you use PARAMETER1 and the second part of the path or the filename like $(PARAMETER1)\\Data\\Workbench.fmw . Than you only need to change the value of the first parameter and you can use it like a variable.

Finally you have to put PARAMETER2 as the source-parameter of you input data.

Badge +14

Is this still the most convenient way to move workspaces between different computers?

Reply