# gr.File upload directory files and sort them

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgr-file-upload-directory-files-and-sort-them%2F35713%3E%5C
**Category:** 🔒 Gradio\
**Created:** [April 6, 2023, 1:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgr-file-upload-directory-files-and-sort-them%2F35713 "2023-04-06T01:27:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![csegalin](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@csegalin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcsegalin)%5C
**Post date:** [April 6, 2023, 1:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgr-file-upload-directory-files-and-sort-them%2F35713%2F1 "2023-04-06T01:27:57Z")

</div>

hello there,  
I never developed in gradio and I was wandering if there is a way to sort the files that you upload using gradio.File  
in the script I am using it seems like they don’t get sorted alphabetically when showing up in the interface.  
If I try to treat the variable I assigned to gr.File it complains is not iterable  
Thanks in advance
