# Problem with uploading data

**URL:** <https://help.galaxyproject.org/t/problem-with-uploading-data/10909>\
**Category:** Uncategorized\
**Tags:** upload, fastqsanger, \_\_apply\_rules\_\_\
**Created:** [October 9, 2023, 7:44am UTC](https://help.galaxyproject.org/t/problem-with-uploading-data/10909 "2023-10-09T07:44:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PPM](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@PPM](https://help.galaxyproject.org/u/PPM)\
**Post date:** [October 9, 2023, 7:44am UTC](https://help.galaxyproject.org/t/problem-with-uploading-data/10909/1 "2023-10-09T07:44:23Z")

</div>

Hello,

I received raw data from 16s sequencing on Illumina and I have list of folders: " name of sample\_run.fastq" and inside of every one of them there are 2 files named: “forward.fastqsanger.gz” and “reversed.fastqsanger.gz”. When i try to upload folders i just get them empty and i cannot upload the inner files because they dont have any sample specific name. How can i solve this without manually renaming every"fastqsanger.gz" file?

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [October 10, 2023, 4:55pm UTC](https://help.galaxyproject.org/t/problem-with-uploading-data/10909/2 "2023-10-10T16:55:07Z")

</div>

Hi @PPM

Yes, you’ll need to rename the files so that the sample name is included. A shell script is probably your best option to do this in batch. And internet search will show many recipes.

Example search phrase I used with Google: “rename file based on folder name shell”  
The first two top hits I found seems like a good place to start but you can review:

- [bash - How to rename files with the name of their parent directory? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/592692/how-to-rename-files-with-the-name-of-their-parent-directory)
- [command line - Rename a file to parent directory's name in terminal - Ask Ubuntu](https://askubuntu.com/questions/746860/rename-a-file-to-parent-directorys-name-in-terminal)

Then you can use the **Upload → Rule Based** to get the data into Galaxy in an organized way. Note that the data needs to have a public URL for this method.

Or, get the data into Galaxy first via regular Upload, then use a tool like **Collection Operations → Apply rules** or **Build list** to organize those files once in Galaxy.

For the Galaxy part, please see: [Using Galaxy and Managing your Data](https://training.galaxyproject.org/training-material/topics/galaxy-interface/)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![PPM](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@PPM](https://help.galaxyproject.org/u/PPM)\
**Post date:** [October 11, 2023, 6:27am UTC](https://help.galaxyproject.org/t/problem-with-uploading-data/10909/3 "2023-10-11T06:27:38Z")

</div>

Hi,

Thank you for your help, I will look into those scripts. Right now i have only 50 folders but in the future without scripts it could be hard if there were more. Once again thank you for your help.

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [April 7, 2026, 10:07pm UTC](https://help.galaxyproject.org/t/problem-with-uploading-data/10909/4 "2026-04-07T22:07:28Z")

</div>

Closed on April 7, 2026, 10:07pm UTC


