# Unexpected behavior of file patterns in package spec

**URL:** https://forum.opentap.io/t/unexpected-behavior-of-file-patterns-in-package-spec/745
**Category:** Technical
**Tags:** plugin
**Created:** [June 23, 2022, 9:40am UTC](https://forum.opentap.io/t/unexpected-behavior-of-file-patterns-in-package-spec/745 "2022-06-23T09:40:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tatiana.boye](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@tatiana.boye](https://forum.opentap.io/u/tatiana.boye)
#### Post date: [June 23, 2022, 9:40am UTC](https://forum.opentap.io/t/unexpected-behavior-of-file-patterns-in-package-spec/745/1 "2022-06-23T09:40:41Z")

</div>

I’ve noticed that file name patterns in `package.xml` work a bit unexpected.

If I do something like this:

```csharp
<Files>
    <File Path="Packages/My Plugin Name/my_folder/" SourcePath="my_folder/*.TapPlan" />
</Files>

```

… it will successfully pick up all test plans from `my_folder` but place them to `%TAP_PATH%\my_folder` and not `%TAP_PATH%\Packages\My Plugin Name\my_folder`.

This doesn’t happen if I use specific names instead of name patterns, e.g.:

```csharp
<Files>
    <File Path="Packages/My Plugin Name/my_folder/My.TapPlan" SourcePath="my_folder/My.TapPlan" />
</Files>

```

Am I missing something?

---

<div class="post-metadata">

### Author: ![alexander.larsen](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@alexander.larsen](https://forum.opentap.io/u/alexander.larsen)
#### Post date: [June 23, 2022, 10:49am UTC](https://forum.opentap.io/t/unexpected-behavior-of-file-patterns-in-package-spec/745/2 "2022-06-23T10:49:20Z")

</div>

Hi @tatiana.boye

I looked into the source code and it looks like OpenTAP isn’t even trying to support this use case. When adding files with glob expressions, the destination path is always set to the source path, and the destination path is ignored.

I think what you are trying to do makes sense though, so I would encourage you to make a feature request by submitting an issue on GitHub!

---

<div class="post-metadata">

### Author: ![tatiana.boye](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@tatiana.boye](https://forum.opentap.io/u/tatiana.boye)
#### Post date: [June 23, 2022, 1:07pm UTC](https://forum.opentap.io/t/unexpected-behavior-of-file-patterns-in-package-spec/745/3 "2022-06-23T13:07:09Z")

</div>

@alexander.larsen Thanks, issue submitted!
