You can also use relative paths like  Also try the following with the desired .fileExtention: 
Here is what the above code is Doing:
1. It’s creating a list of all the files in the directory.
2. It’s creating a list of all the files in the directory that end with .png.
3. It’s creating a list of all the files in the directory that end with .jpg.
4. It’s creating a list of all the files in the directory that end with .gif.
5. It’s creating a list of all the files in the directory that end with .bmp.
6. It’s creating a list of all the files in the directory that end with .tif.
7. It’s creating a list of all the files in the directory that end with .tiff.
8. It’s creating a list of all the files in the directory that end with .svg.
9. It’s creating a list of all the files in the directory that end with .eps.
10. It’s creating a list of all the files in the directory that end with .pdf.