I have written something that reads a file line by line(each line has a path to a folder like: C:\test\test)

It gets the path and then searches the path for all the files, puts them into a list and then asks the user which movie they want to search for. This is where im stuck

Im wanting to get the program to take the users input no matter if its lowercase or uppercase and find the matching files and display them in a numbered list to the user

for example: User searches - star wars

i want to display the files found like:

```
1 Star Wars III.mp4
2 Star Wars Return of the Jedi.mp4

```

so basically print the file name.
What would be the best way to achieve this?

I have this so far but im stuck at this part:

```
import os

def find_all():
    list_num = []
    print('\n','='*8,'Current folders saved','='*8)
    with open('movielist.txt', 'r') as file:
        data = file.read().splitlines()
        file.close()
        for i, item in enumerate(data, start=1):
            print('\n',i,item)
            list_num.append(i)

    user_choice = int(input('\nWhat location do you want to search? '))
    if user_choice == 1:
        one = data[0]
        filelist = os.listdir(one)
        movie_name = input('\nWhat movie are you looking for?: ')
        for i, item in enumerate(filelist, start=1):
            print('\n',i,item)

```

so far this just prints all the files in the location.

this is the current output i get:

```
 ======== Current folders saved ========

 1 K:\Movies

 2 D:\Movies_list\Favorites

 What location do you want to search? 2

 What movie are you looking for?: star wars

 1 Hot Fuzz 2007 1080p.mkv

 2 Inglorious basterds 2008 1080p.mkv

 3 Jurassic Park 3 2001 1080p.mkv

 4 Over the Moon 2020 1080p.mkv

 5 Rogue One - A Star Wars Story 2016 1080p.mkv

 6 Shaun of the Dead 2004 1080p.mkv

 7 Star Wars III 1080p.mkv

 8 The Croods A New Age 2020 1080p.mkv

 9 Thor Ragnarok 2017 1080p.mkv

```

Using the star wars example. I would want the program to just display Star Wars III 1080p.mkv and Rogue One - A Star Wars Story 2016 1080p.mkv