# How to build a collection from files already in history

**URL:** <https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632>\
**Category:** Uncategorized\
**Created:** [February 14, 2019, 2:16pm UTC](https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632 "2019-02-14T14:16:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nimeth](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@Nimeth](https://help.galaxyproject.org/u/Nimeth)\
**Post date:** [February 14, 2019, 2:16pm UTC](https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632/1 "2019-02-14T14:16:12Z")

</div>

I am looking for a way to make collection from data already uploaded and loaded into history without clicking them (have a lot of data). So either using a regular expression, or on sorted data.

---

<div class="post-metadata">

**Author:** ![marten](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/marten/32/6_2.png) [@marten](https://help.galaxyproject.org/u/marten)\
**Post date:** [February 14, 2019, 3:41pm UTC](https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632/2 "2019-02-14T15:41:14Z")

</div>

You can

- use [‘Build list’ tool](https://usegalaxy.org/root?tool_id= __BUILD_LIST__ ), select ‘multiple datasets’ as input and select all by pressing `ctrl/cmd` + `a`
- use API e.g. with [BioBlend](https://bioblend.readthedocs.io/en/latest/) - a Python library for scripting and using Galaxy API
- ‘reupload’ the data using rule based uploader - [tutorial](https://training.galaxyproject.org/training-material/topics/galaxy-data-manipulation/tutorials/upload-rules/tutorial.html#uploading-datasets-with-rules) - which will give you regex and other great tool to filter data and create collections

---

<div class="post-metadata">

**Author:** ![MoHeydarian](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@MoHeydarian](https://help.galaxyproject.org/u/MoHeydarian)\
**Post date:** [February 14, 2019, 4:55pm UTC](https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632/3 "2019-02-14T16:55:29Z")

</div>

If your data has group specific identifiers you could use the history panel search, then select ‘all’, and form your collection.

---

<div class="post-metadata">

**Author:** ![Nimeth](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@Nimeth](https://help.galaxyproject.org/u/Nimeth)\
**Post date:** [February 15, 2019, 9:49am UTC](https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632/4 "2019-02-15T09:49:41Z")

</div>

Great, didnt see the filtering option based on regular expression. But - by some mistakes in dataset manipulation (still learning) I have some duplicate datafiles. Is there an easy way to filter them out? Trying to find a regular expression way to select the file only once, but it didnt work for me so far. Also, the group tool doesnt work on all files in history.

---

<div class="post-metadata">

**Author:** ![marten](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/marten/32/6_2.png) [@marten](https://help.galaxyproject.org/u/marten)\
**Post date:** [February 15, 2019, 2:51pm UTC](https://help.galaxyproject.org/t/how-to-build-a-collection-from-files-already-in-history/632/5 "2019-02-15T14:51:47Z")

</div>

Could you please de-compose your list to individual issues and describe them more?
