I am running a workflow on several different machines, and multiple external hard drives. The data files are typically something like E:\Data\..., but could be C:\Data\... or other names, depending on which computer is used. I cannot change any of the drive designations, even temporarily. My workflow has about 30 distinct inputs. Is there a way to set a variable at the start of the workflow that is then used to set the path to the data in the rest of the workflow ? Right now I have to manually change the links to all 30 files when switching between machines.
Thanks
Solved! Go to Solution.
You can use something like:
..\..\Data\*.csv
This should pick up your path automagically and look for the Data folder and any csv within the folder
Thanks! I have that logic in the workflow now, the issue is that the drive name (C,D,E,F) keeps changing between machines.
That syntax works for me running files from my local machine, if copied to a server it runs the same way. Not sure if i'm not understanding the problem correctly
Literally this
Hi @MikeD,
Yes you can create a user constant:
First, click on any white space on the canvas, in the configuration window, go to 'Workflow' tab and click on the "+" sign. Then input the name of your user constant, e.g. 'Drive' and input a value, e.g. "C" for now:
Then, in all your Input tools, put %User.Drive%:\Users\blablabla\test2.xlsx as your path:
When you run the workflow, the user constant, %User.Drive% will then be replaced by "C".
Next time, when the Drive changes, all you need to do it updated the value of the user constant in the configuration window
Hope this helps
Jasper
Thanks to everyone for the help!