# Tags : How to execute tests located in several folders with command line?

**URL:** <https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014>\
**Category:** Robot Framework\
**Created:** [25 November 2020 09:12 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014 "2020-11-25T09:12:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Centaure13](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Post date:** [25 November 2020 09:12 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014/1 "2020-11-25T09:12:27Z")

</div>

Hello,

I would like, with command line, to execute some tests with specific tags. But these tests are located in different folders.

Example :

- Folder1 contains “TestSuite1” with tag “smoke”
- Folder2 contains “TestSuite2” with tag “smoke”

I need to have 2 different folders because the context is different (Back-office and front office).

I try : “robot -i smoke Folder1 -i smoke Folder2” but it doesn’t work.

Thanks for your help !

---

<div class="post-metadata">

**Author:** ![zastress](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zastress/32/1259_2.png) [@zastress](https://forum.robotframework.org/u/zastress)\
**Post date:** [25 November 2020 10:00 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014/2 "2020-11-25T10:00:54Z")

</div>

Target the parent folder of Folder1 and Folder2 with the -i smoke or `robot -i smoke Folder1 Folder2`. You don’t need to re-indicate the tag after every destination.

---

<div class="post-metadata">

**Author:** ![Centaure13](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Post date:** [25 November 2020 10:08 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014/3 "2020-11-25T10:08:08Z")

</div>

Thank you ! It works ! 🙂

I have an additionnal question : what is the command line if you want to run on one time this configuration :

```
Folder1 contains “TestSuite1” with tag “smoke”
Folder2 contains “TestSuite2” with tag “sanity”
```

---

<div class="post-metadata">

**Author:** ![zastress](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zastress/32/1259_2.png) [@zastress](https://forum.robotframework.org/u/zastress)\
**Post date:** [25 November 2020 10:16 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014/4 "2020-11-25T10:16:10Z")

</div>

`robot -i smokeORsanity Folder1 Folder2`

---

<div class="post-metadata">

**Author:** ![Centaure13](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Centaure13](https://forum.robotframework.org/u/Centaure13)\
**Post date:** [25 November 2020 10:23 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014/5 "2020-11-25T10:23:47Z")

</div>

You have resolved my issues !  
I’ve already seen this syntax “OR” but I thought that RF ran “smoke” OR “sanity” tags (not twice…)

Thanks again !

---

<div class="post-metadata">

**Author:** ![zastress](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/zastress/32/1259_2.png) [@zastress](https://forum.robotframework.org/u/zastress)\
**Post date:** [25 November 2020 10:27 UTC](https://forum.robotframework.org/t/tags-how-to-execute-tests-located-in-several-folders-with-command-line/1014/6 "2020-11-25T10:27:45Z")

</div>

You’re welcome!
