Q:

Reading multiple Excel files from the Directory - Python Code Not working

I'm trying to read all the excels file from the directory (esp. Test_File.xlsx). The code work when I just want to see the files on the terminal, but it gives an error (traceback) when I try to append all the TEST_Files.xlsx into one Test4.xlsx. 
ERROR MESSAGE : 
  File "Excel_Script3.py", line 16, in <module>
    data = pd.read_excel(filename, 'Sheet1')
  File "/Users/ItsMyFuckingSystem/miniconda3/lib/python3.5/site-packages/pandas/io/exce‌​l.py", line 163, in read_excel
    io = ExcelFile(io, engine=engine)
  File "/Users/ItsMyFuckingSystem/miniconda3/lib/python3.5/site-packages/pandas/io/exce‌​l.py", line 206, in init
    self.book = xlrd.open_workbook(io)
  File "/Users/ItsMyFuckingSystem/miniconda3/lib/python3.5/site-packages/xlrd/__init__.py‌​", line 394, in open_workbook
    f = open(filename, "rb") 
FileNotFoundError: [Errno 2] No such file or directory: 'Test_File_1.xlsx'

A:

The following code will give the filename including the full path. In your code you are using filename twice (once with dirs, once with filenames). The filename does not contain any path information, but root does.
See:
https://docs.python.org/2/library/os.html
import os

for root, dirs, files in os.walk(".", topdown=False):
    for filename in files:
        if filename.endswith('.xlsx') and filename.startswith('Test_File'):
            print (os.path.join(root, filename))

