find all the files in a directory and make a list out of this

http://stackoverflow.com/questions/5629242/getting-every-file-in-a-directory-python
select the file name from the array

the file name is read not from the directory but from the created array
[a]
now the last change transferred to the FTIR.py

later were in the temp (not shown)

select name from the array (not from the directory)
first for loop to make a plots

the foor loop plots all the data that have been found in the directory