# Get environment folder activity

**URL:** <https://forum.uipath.com/t/get-environment-folder-activity/735545>\
**Category:** Activities\
**Tags:** question, system, uiautomation, activities\
**Created:** [April 18, 2024, 7:13pm UTC](https://forum.uipath.com/t/get-environment-folder-activity/735545 "2024-04-18T19:13:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Learner](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/a_learner/32/181354_2.png) [@A\_Learner](https://forum.uipath.com/u/A_Learner)\
**Post date:** [April 18, 2024, 7:13pm UTC](https://forum.uipath.com/t/get-environment-folder-activity/735545/1 "2024-04-18T19:13:00Z")

</div>

Hi,  
Why do I have to use “Get environment folder” in specifying the file path. Can I use relative file path?  
For example “MyWorkingFolder\CodeFiles\Input.xlsx” for Use Application Browser.

Do I have to use MyEnvironment + “\MyWorkingFolder\CodeFiles\Input.xlsx”

Thank you,

---

<div class="post-metadata">

**Author:** ![arjunshenoy](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/arjunshenoy/32/404588_2.png) [@arjunshenoy](https://forum.uipath.com/u/arjunshenoy)\
**Post date:** [April 18, 2024, 7:20pm UTC](https://forum.uipath.com/t/get-environment-folder-activity/735545/2 "2024-04-18T19:20:17Z")

</div>

Hi @A_Learner

Get Environment Folder allows for a standardized approach across different environments. However, you can use relative file paths in some cases, like your example **MyWorkingFolder\CodeFiles\Input.xlsx** if the file is within the project directory.

Just ensure the path is correctly specified based on your project structure.

Hope this helps,  
Best Regards.

---

<div class="post-metadata">

**Author:** ![ashokkarale](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashokkarale/32/474400_2.png) [@ashokkarale](https://forum.uipath.com/u/ashokkarale)\
**Post date:** [April 19, 2024, 8:46am UTC](https://forum.uipath.com/t/get-environment-folder-activity/735545/3 "2024-04-19T08:46:48Z")

</div>

@A_Learner,

You can use both approaches as per your choice. There is no right/wrong.

Thanks,  
Ashok 🙂

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [April 19, 2024, 8:51am UTC](https://forum.uipath.com/t/get-environment-folder-activity/735545/4 "2024-04-19T08:51:32Z")

</div>

@A_Learner

You can use both…natively in UiPath activities relative path also would work…but when you write an invoke code or use any 3rd party activities relative pth might not work…at that time you would be interested in getting the current environment path and append with relative pth to make the fullpth and use it

Also while joining using path.combine is recommended rather than direct +…path.combine will take care of extra or missing slashes in the pth

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [April 22, 2024, 8:52am UTC](https://forum.uipath.com/t/get-environment-folder-activity/735545/5 "2024-04-22T08:52:04Z")

</div>

Closed on April 22, 2024, 8:52am UTC

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