# Importing Variables and Resource files

**URL:** <https://forum.robotframework.org/t/importing-variables-and-resource-files/5789>\
**Category:** Robot Framework\
**Created:** [6 June 2023 11:03 UTC](https://forum.robotframework.org/t/importing-variables-and-resource-files/5789 "2023-06-06T11:03:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [7 June 2023 00:33 UTC](https://forum.robotframework.org/t/importing-variables-and-resource-files/5789/5 "2023-06-07T00:33:56Z")

</div>

Hi Subha,

How about in the resources folder you create a main.robot that you import in all your robot tests, this main.robot file then has all the imports for the other resoiurce files that your tests need, then if a resource file is moved you update just main.robot and all your test cases can stay the same.

I gave an example of this approach here:

> [@Create common robot file for generic actions in robot framework](https://forum.robotframework.org/t/create-common-robot-file-for-generic-actions-in-robot-framework/5150/2):
>
> Hi @bk-user , The section of the documentation you need is here: [2.8.1 Resource files](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-353) You can name the file as .resource or .robot, you import them with the resource keyword in the settings section. I find to syntax highlighting doesn’t work in some editors when you use .resource so I usually use .robot You can also create a base .robot file that includes several .robot files, then you can group the keywords in several .robot files as needed but only have one .robot file to include in your te…

Dave.

---

_[View the full topic](https://forum.robotframework.org/t/importing-variables-and-resource-files/5789)._
