Question: Consider I have 1000 `.CSV` files with names of my employees. So there isn't any order or numbers in file names. Is there a way to say to the computer in Python language, that read files from first to end in a special folder, whit no matter what their name is?
(It's not important for me the data is for who, I only need to grab these data for analyzing).

Answer: 
use code like:(replace current path (.) with your path:

```
import os, fnmatch
import csv
listOfFiles = os.listdir('.')  
pattern = "*.csv"  
for entry in listOfFiles:  
    if fnmatch.fnmatch(entry, pattern):
        with open(entry, newline='') as csvfile:
            spamreader = csv.reader(csvfile)
            for line in spamreader:
                print(line)

```

##########Using Danadas package

```
import os, fnmatch
import pandas as pd

listOfFiles = os.listdir('.')  
pattern = "*.csv"  
for entry in listOfFiles:  
    if fnmatch.fnmatch(entry, pattern):
        read_File_as_DF=pd.read_csv(entry)
        print(read_File_as_DF)

```
Yes you can. I would use a simple regex based tester to check the file and so essentially what you're doing is you are using a for loop to go through the directory and using the if-statement, we test the file to see if it contains '.csv'. After this we open the file and we simply append it to our output which you can either choose to analyse or store as a file. I've commented out the option of outputting to a file, however if you wish to you could.

```py
import re

# Redefine this to the path of your folder:
folderPath = "SET UNIX PATH HERE"

output = None
for file in os.listdir(folderPath):
    if re.search(r'.csv', file):
        with open(file, r) as readFile:
            output += readFile.read()

# Uncomment this part if you would like to store the output to a file
# Define the path to the file that will be created:
# outputFilePath = "SET UNIX PATH"
# with open(outputFilePath, w+) as outputFile:
#     outputFile.write(output)

```

Hope this helps :)