Saving a Path to a Variable

I am using “Use Excel File” to select the file from a folder. I would prefer to select the file using the option to browse instead of manually typing the path.

Once I have selected the file I would like to know how to add the file’s path to a variable for later use.

Hi @dhtguru

You can use assign activity , define a variable and save this path to that variable and then use it in your workflow.

Alternatively, you can choose to create asset in orchestrator and use get asset activity to fetch its value and then use in the workflow.

Thank you for the response. Is there anyway to use grab the path already captured. I would rather not have to type the path since it can be quite long sometimes. Is it possible to grab the value I highlighted in the picture systematically without having to type it myself?

@dhtguru

Try Reference as property of this activity

Hi,

The following may help you.

Excel.FilePath

Regards,

1 Like

@dhtguru,

Just click on that folder icon highlight in the below screenshot. This open the file selection pop-up.

@dhtguru instead of hardcoding the file path use assign activity of string type variable and pass your file path in that variable and then use your variable in the excep process scope or better save your file path in Config file and then work on that .. thats the best approach

Cheers
Happy Automation

@dhtguru

You can click on the selected path and copy it to assign activity as well

Also generally if you need to copy any filepath..just right click with holding shift and you would see copy as path option which would give the fullpath as is

Cheers

Hi @dhtguru
Use assign activity before the Excel process scope and create a variable and pass the full path there & use like below,

If helpful, mark as solution.

Happy automation with UiPath

Hi @dhtguru

Refer the below image to save the file path in a specific variable. You can use that file path in various instances further in your process

Thanks!!

Perfect. Exactly what I needed!
Thank you.
Thank you all.

1 Like

You’re welcome. Mark my post as a solution

Thanks!!

I suggest doing the free training at academy.uipath.com as it will teach you how to do these very basic things.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.